Pls, help me with re

Erik Max Francis max at alcyone.com
Mon Mar 3 11:13:09 CET 2003


Lexy Zhitenev wrote:

> This re matches the second example, but it doesn't match the first
> one.

There are fancy regular expression ways to get that effect, but why not
just take the easy way out?  If the string contains an equals sign, chop
off it and everything before it; otherwise leave it alone.  Then, use a
regular expression to look for numerics.  Three lines of code.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/  \ I can paint a portrait of myself / I will call me a black Mona Lisa
\__/ Lamya
    Bosskey.net: Unreal Tournament 2003 / http://www.bosskey.net/ut2k3/
 A personal guide to Unreal Tournament 2003.




More information about the Python-list mailing list