0

Hi,

working with the 're' module I am having some difficulty figuring out simple RE. here is the code.


p = re.complie('amb')
m = p.match("mamba")
print m.group()

according to the following documents ...

http://www.amk.ca/python/howto/regex/regex.html#SECTION000300000000000000000
http://gnosis.cx/publish/programming/regular_expressions.html

there should be a pattern match like... 'amb' but I am getting 'None' back.

Can someone help explain the reason?

Thanks greatly for any help

-- Andrew

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by asrekdal
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.