newbie regexp question

mindlace mindlace at imeme.net
Wed Apr 26 18:09:38 EDT 2000


Fredrik Lundh wrote:
> 
> mindlace <mindlace at imeme.net> 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
python.org

-- 
ethan mindlace fremen        mindlace at imeme.net
zope    -&-     imap email   -&-   mailing list
weave your web with the web at http://imeme.net




More information about the Python-list mailing list