import retext = r"""S_9900002127S_9900000719S_9900008012"""print( re.findall(r'0+([1-9]\d*)$', text, re.M) )
Standard input is empty
['2127', '719', '8012']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!