fork download
  1. import re
  2. content = "abc/def/efg 212 234 asjakj"
  3. match = re.search('^[^\s/]+', content, flags = re.M)
  4. if match:
  5. content_new = match.group()
  6. print(content_new)
Success #stdin #stdout 0.03s 9384KB
stdin
Standard input is empty
stdout
abc