Clarify Regex in Python.
Terry Hancock
hancock at anansispaceworks.com
Tue Sep 12 16:34:12 EDT 2006
cooldudevamsee at gmail.com wrote:
> After may frustrated attempts I came to know that "match" function
> in python re package actually start the matchs at the begining of the
> subject, where "search" will find the given pattern any where in the
> subject.
>
> My Problem is, I want to know how can I force match functions to
> match the pattern any location in the subject. i.e I want to turn off
> before said behaviour.
re.match = re.search
perhaps?
Stupid thing to do, but it meets the spec.
Cheers,
Terry
--
Terry Hancock (hancock at AnansiSpaceworks.com)
Anansi Spaceworks http://www.AnansiSpaceworks.com
More information about the Python-list
mailing list