REGULAR EXPRESSION
Tuomas
tuomas.vesterinen at pp.inet.fi
Tue Sep 4 11:33:55 EDT 2007
More information about the Python-list mailing list
Tue Sep 4 11:33:55 EDT 2007
- Previous message (by thread): scipy.org website
- Next message (by thread): REGULAR EXPRESSION
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
AniNair wrote:
> hi.. I am trying to match '+ %&/-' etc using regular expression in
> expressions like 879+34343. I tried \W+ but it matches only in the
> beginning of the string Plz help Thanking you in advance...
>
Is this what you are seeking for?
>>> re.compile('(\+{0,1})?([0-9]+)').findall('879+34343')
[('', '879'), ('+', '34343')]
Tuomas Vesterinen
- Previous message (by thread): scipy.org website
- Next message (by thread): REGULAR EXPRESSION
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list