import reregex = r"([2-9]|\d\d+)"test_str = "-523"print(re.findall(regex, test_str))
Standard input is empty
['5', '2', '3']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!