Brackets in brackets, braces in braces
Skip Montanaro
skip at pobox.com
Tue Apr 16 13:17:40 EDT 2002
Arpad> How can I find strings [using regular expressions] ... Where in
Arpad> the braces can be also another braces.
In general, you can't. As Tim Peters and others have pointed out in the
past, regular expressions can't count. You need a more powerful parser than
re's to properly handle nested constructs.
--
Skip Montanaro (skip at pobox.com - http://www.mojam.com/)
More information about the Python-list
mailing list