fork download
  1. import re
  2. theString = "abcABC"
  3. pattern = re.compile(r"(?<![A-Z])[A-Z]{3}(?![A-Z])")
  4. result = pattern.search(theString)
  5.  
  6. print("Matched string: " + result.group())
Success #stdin #stdout 0.1s 10104KB
stdin
Standard input is empty
stdout
Matched string: ABC