import rereg = re.compile("([a-z]+)(8?)")s = "ccc8"m = reg.match(s)if m: print(m.groups())
Standard input is empty
('ccc', '8')
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!