fork download
  1. import re
  2.  
  3. s = "'didn't'"
  4. print(s.strip("'")[s.strip("'").find("'")+1])
  5. print(re.search(r'\b\'(\w)', s).group(1))
  6. print(re.search(r'\b\'([^\W\d_])', s).group(1))
  7. print(re.search(r'\b\'([a-z])', s, flags=re.I).group(1))
  8. print(re.findall(r'\b\'([a-z])', "'didn't know I'm a student'", flags=re.I))
Success #stdin #stdout 0.02s 9016KB
stdin
Standard input is empty
stdout
t
t
t
t
['t', 'm']