Pls, help me with re
Erik Max Francis
max at alcyone.com
Mon Mar 3 04:48:02 EST 2003
Lexy Zhitenev wrote:
> I want to match a number if it is the only one in the string, and the
> second
> one, if '=' preceeds it.
>
> Example
>
> 'Course: 23,95' - matches '23,95'
> '$1 = 23,95 y' - matches '23,95'.
Why not a regular expression simply like [including both commas and
periods]:
=.*([0-9,.]+)
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ Custom reconciles us to everything.
\__/ Edmund Burke
Computer science / http://www.alcyone.com/max/reference/compsci/
A computer science reference.
More information about the Python-list
mailing list