Re: Clarify Regex in Python.

2006-09-12 Thread Terry Hancock
[EMAIL PROTECTED] 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 f

Re: Clarify Regex in Python.

2006-09-12 Thread [EMAIL PROTECTED]
k, people, thanks for ur replys. -- http://mail.python.org/mailman/listinfo/python-list

Re: Clarify Regex in Python.

2006-09-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > I know there r many more methods to do the job, I just wonder can we > turnoff the default behaviour of match method. that's not the "default behaviour", that's how match works. if you want search, use search instead. -- http://mail.python.org/mailman/listinfo/pyt

Re: Clarify Regex in Python.

2006-09-12 Thread John Machin
[EMAIL PROTECTED] wrote: > > Erm, is there some specific reason why you can't just use the search > > method? Why does it *have* to be match()? > > > > regards > > Steve > > > I know there r many more methods to do the job, I just wonder can we > turnoff the default behaviour of match method. >

Re: Clarify Regex in Python.

2006-09-12 Thread [EMAIL PROTECTED]
> Erm, is there some specific reason why you can't just use the search > method? Why does it *have* to be match()? > > regards > Steve I know there r many more methods to do the job, I just wonder can we turnoff the default behaviour of match method. Thanks. -- http://mail.python.org/mailman

Re: Clarify Regex in Python.

2006-09-12 Thread Steve Holden
[EMAIL PROTECTED] 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

Re: Clarify Regex in Python.

2006-09-12 Thread A.M. Kuchling
On 12 Sep 2006 05:07:03 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 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. Use search() instead; that's why the method is th

Clarify Regex in Python.

2006-09-12 Thread [EMAIL PROTECTED]
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