Re: a little parsing challenge ☺

rusi rustompmody at
Sun Jul 17 07:52:25 EDT 2011

On Jul 17, 4:34 pm, Chris Angelico <ros... at> wrote:
> On Sun, Jul 17, 2011 at 5:47 PM, Xah Lee <xah... at> wrote:
> > the problem is to write a script that can check a dir of text files
> > (and all subdirs) and reports if a file has any mismatched matching
> > brackets.
> I wonder will it be possible to code the whole thing as a single
> regular expression... I'm pretty sure it could be done as a sed or awk
> script, but I'm insufficiently expert in either to do the job.
> ChrisA

No possible: See

Informally stated as regexes cant count.

More information about the Python-list mailing list