RegEx

John La Rooy larooy at xtar.co.nz
Wed May 15 03:58:11 EDT 2002


Don't they get messy quickly?
another way to escape the parenthesis is to use the [] grouping

re.compile('[()]')

Well it *is* more symetrical. Is it more readable?

John

On Tue, 14 May 2002 17:17:25 +0200
Thomas Guettler <zopestoller at thomas-guettler.de> wrote:


> 
> 
> Parenthesis are special in regular expressions. They are used
> for grouping. Use re.compile(r'\(|\)', ...) to match paranthesis.
> 
> 
> thomas
> 



More information about the Python-list mailing list