Results not quite what I expected

Robin Thomas robin.thomas at starmedia.net
Mon Apr 2 15:53:58 EDT 2001


At 02:28 PM 4/2/01 -0500, Kemp Randy-W18971 wrote:
>Alex:
>    I tried your suggestion, and I am close, but not quite.  What is 
> happening with the number split?


>     number = re.compile(r'\d+\.?d*')

Your regex reads, "One or more digits, followed optionally by a '.' 
character, followed by zero or more occurrences of the string 'd'".

You forgot to backslash the last "d".


--
Robin Thomas
Engineering
StarMedia Network, Inc.
robin.thomas at starmedia.net





More information about the Python-list mailing list