I am quite new to python and regex (regex newbie here), and I have the following simple string:
s=r\"\"\"99-my-name-is-John-Smith-6376827-%^-1-2-767980716\"\
Save the regular expressions for something that requires more heavy lifting.
>>> def parse_last_digits(line): return line.split('-')[-1] >>> s = parse_last_digits(r"99-my-name-is-John-Smith-6376827-%^-1-2-767980716") >>> s '767980716'