"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
...
> You have to quote metacharacters if you want to match them. The escape
> method is useful for this:
>
> >>> re.escape('(a)')
> '\\(a\\)'
Doh! Of course! Thanks everyone.
-- Mike --
--
http://mail.python.o
At Friday 8/12/2006 02:53, Mike wrote:
I finally simplified my problem down to this simple case:
re.match(r'\\this', r'\\this')
Both the pattern and the string to match are identical raw strings, yet they
don't match. What does match is this:
re.match(r'this', r'\\this')
Perhaps y
Mike wrote:
> I've been having trouble with a regular expression, and I finally simplified
> things down to the point that (a) my example is very simple, and (b) I'm
> totally confused. There are those who would say (b) is normal, but that's
> another thread.
>
> I finally simplified my proble
Mike wrote:
> I've been having trouble with a regular expression, and I finally simplified
> things down to the point that (a) my example is very simple, and (b) I'm
> totally confused. There are those who would say (b) is normal, but that's
> another thread.
>
> I finally simplified my problem dow
I've been having trouble with a regular expression, and I finally simplified
things down to the point that (a) my example is very simple, and (b) I'm
totally confused. There are those who would say (b) is normal, but that's
another thread.
I finally simplified my problem down to this simple cas