fork download
  1. import re
  2. p = re.compile(r'<place of birth="([^"]*)')
  3. location_info = "<place of birth=\"Stockholm\">"
  4. match = p.search(location_info)
  5. if match:
  6. print(match.group(1))
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
Stockholm