On Tue, 14 Dec 2004, Gooch, John wrote:

> I am used to ( in Perl ) the entire string being searched for a match
> when using RegExp's. I assumed this was the way Python would do it do,
> as Java/Javascript/VbScript all behaved in this manner. However, I found
> that I had to add ".*" in front of my regular expression object before
> it would search the entire string for a match. This seems a bit unusual
> from my past experience, but it solved the issue I was experiencing.

Hi John,


The question actually comes up a lot.  *grin*  If you're interested,
here are two more references that talk about "match() vs search()":


Python Standard Library docs on 're' module:
http://www.python.org/doc/lib/matching-searching.html


Regular Expression HOWTO:
http://www.amk.ca/python/howto/regex/regex.html#SECTION000720000000000000000


Good luck to you!

_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to