Freeze problem with Regular Expression
Kirk
noreply at yahoo.com
Mon Jun 30 10:45:18 EDT 2008
On Wed, 25 Jun 2008 15:29:38 -0700, John Machin wrote:
> Several problems:
Ciao John (and All partecipating in this thread),
first of all I'm sorry for the delay but I was out for business.
> (1) lose the vertical bars (as advised by others) (2) ALWAYS use a raw
> string for regexes; your \s* will match on lower- case 's', not on
> spaces
right! thanks!
> (3) why are you using findall on a pattern that ends in "$"?
Yes, you are right, I started with a different need and then it changed
over time...
> (6) as remarked by others, you haven't said what you are trying to do;
I reply here to all of you about such point: that's not important,
although I appreciate very much your suggestions!
My point was 'something that works in Perl, has problems in Python'.
In respect to this, I thank Peter for his analysis.
Probably Perl has a different pattern matching algorithm.
Thanks again to all of you!
Bye!
--
Kirk
More information about the Python-list
mailing list