On May 1, 7:44 pm, NevilleDNZ <[EMAIL PROTECTED]> wrote:

> Below is a (flawed) one line RegEx that checks curly brackets (from
> awk/c/python input) are being matched.  Is there a one liner for doing
> this in python?

There is not even a 1000-liner regular expression for this; it's a
context-free language [1], not a regular one [2]. Either do it
manually or use a parser generator [3].

George

[1] http://en.wikipedia.org/wiki/Context-free_language
[2] http://en.wikipedia.org/wiki/Regular_language
[3] http://wiki.python.org/moin/LanguageParsing
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to