fork(1) download
  1. import re
  2. string_1 = "Stallaresvei s 10013.pdf"
  3. regexp = r"(?<=\s)[a-zA-Z.]+(?=[\s0-9]+\.pdf)|(?<=\s)[0-9]+(?=\.pdf)"
  4. m = re.findall(regexp, string_1)
  5. print(m)
Success #stdin #stdout 0s 9992KB
stdin
Standard input is empty
stdout
['s', '10013']