import rerx = r'\bon\s+(\S+)'s = "Card ADFGTR43567 on DeviceName"m = re.search(rx, s)if m: print(m.group(1))
Standard input is empty
DeviceName
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!