help with regex

James Smith bjlockie at lockie.ca
Wed Oct 8 06:25:54 CEST 2014


I want the last "1"
I can't this to work:

>>> pattern=re.compile( "(\d+)$" )
>>> match=pattern.match( "LINE: 235 : Primary Shelf Number (attempt 1): 1")
>>> print match.group()



More information about the Python-list mailing list