Regular expressions question
aditya shukla
adityashukla1983 at gmail.com
Thu Oct 2 16:38:20 EDT 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
None
-i am not able to find the match .
Can someone help me here.
Thanks
Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081002/1a01889b/attachment.html>
More information about the Python-list
mailing list