fork(1) download
  1. import re
  2. check_string = 'I have a string 09A4N5'
  3. m = re.search(r'\b[A-Z0-9]{6}\b', check_string)
  4. if m:
  5. print(m.group())
  6. print(m.start(0))
Success #stdin #stdout 0.02s 27712KB
stdin
Standard input is empty
stdout
09A4N5
16