Regular Expression: Matching substring

Kevin CH hierarchicalpolymorphist at gmail.com
Thu Apr 13 02:34:26 EDT 2006


Thank you for your reply.

> Perhaps you are using grep, or you have stumbled on the old deprecated
> "regex" module and are using that instead of the "re" module. Perhaps
> not as you are using only 2 plain vanilla RE operations which should
> work the same way everywhere. Perhaps you are having trouble with
> search() versus match() -- if so, read the section on this topic in the
> re docs. It's rather hard to tell what you are doing without seeing the
> code you are using.

Sorry I should have said it up front.  I'm using Kudos (which I'm sure
uses re module) to test these strings on the pattern, and had the match
results as I stated.  (search() of course gives me true since the
pattern appears in the substrings of both strings.)




More information about the Python-list mailing list