newbie regexp question

mindlace mindlace at
Wed Apr 26 18:09:38 EDT 2000

Fredrik Lundh wrote:
> mindlace <mindlace at> wrote:
> > I've got a re.compile('\W') that I can use to search for non-alphanumeric
> > characters in a variable.  However, if the variable has ( in it, for
> example,
> > the search breaks.
> breaks?

Er, yes, like if there's a ( it gives me an error.
> have no idea what you're talking about here, but maybe
> re.escape does what you wants?

Yes, it does.  Thanks very much.  I should have looked at Module Contents in the documentation on

ethan mindlace fremen        mindlace at
zope    -&-     imap email   -&-   mailing list
weave your web with the web at

More information about the Python-list mailing list