fork(1) download
  1. import re
  2. rx = r'\bon\s+(\S+)'
  3. s = "Card ADFGTR43567 on DeviceName"
  4. m = re.search(rx, s)
  5. if m:
  6. print(m.group(1))
Success #stdin #stdout 0.01s 27712KB
stdin
Standard input is empty
stdout
DeviceName