regex problem
Odd-R.
oddr at home.no.no
Tue Jul 26 05:57:23 EDT 2005
Input is a string of four digit sequences, possibly
separated by a -, for instance like this
"1234,2222-8888,4567,"
My regular expression is like this:
rx1=re.compile(r"""\A(\b\d\d\d\d,|\b\d\d\d\d-\d\d\d\d,)*\Z""")
When running rx1.findall("1234,2222-8888,4567,")
I only get the last match as the result. Isn't
findall suppose to return all the matches?
Thanks in advance.
--
Har du et kjøleskap, har du en TV
så har du alt du trenger for å leve
-Jokke & Valentinerne
More information about the Python-list
mailing list