Regular expressions question

aditya shukla adityashukla1983 at
Thu Oct 2 22:38:20 CEST 2008

Hello folks ,

I trying to match a pattern in a string , i am new in using re .This is what
is happening

When i do this

p = re.compile('(\[&&NHX:)')
>>> m = p.match("[&&NHX:C=0.195.0]")
>>> print m
<_sre.SRE_Match object at 0x013FE1E0>
 --- thus i am able to find the match
but when i use the string

m = p.match("-bin-ulockmgr_server:0.99[&&NHX:")
>>> print m
-i am not able to find the match .

Can someone help me here.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list