fork download
  1. import re
  2. rx = r"(?<!:)\b\w+:\w+\?"
  3. s = "\"I want to find JKD:Jdj:SL? and YK:kd? JKD:askdlfj:Jdj:SL? jklj? jklj:jklj\" "
  4. print(re.findall(rx, s))
Success #stdin #stdout 0s 23304KB
stdin
Standard input is empty
stdout
['YK:kd?']