fork(1) download
  1. import re
  2. p = re.compile(ur'(?P<name1>[A-Z][A-Za-z]*)[\s_](?P<name2>[A-Z][A-Za-z]*|)')
  3. test_str = u">:{abcd|}+)_(#)_@_Mitch_(@<$)_)*zersx!)Pamela@(_+)("
  4. match = re.search(p, test_str)
  5. if match:
  6. print(match.group("name1"))
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
Mitch