Re: Utility to locate errors in regular expressions

2013-05-24 Thread Christian Gollwitzer
Am 24.05.13 14:58, schrieb Malte Forkel: Finding out why a regular expression does not match a given string can very tedious. I would like to write a utility that identifies the sub-expression causing the non-match. Try http://laurent.riesterer.free.fr/regexp/ it shows the subexpressi

Re: Utility to locate errors in regular expressions

2013-05-24 Thread rusi
On May 24, 5:58 pm, Malte Forkel wrote: > Finding out why a regular expression does not match a given string can > very tedious. I would like to write a utility that identifies the > sub-expression causing the non-match. My idea is to use a parser to > create a tree representing the complete regul

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Neil Cerutti
On 2013-05-24, Roy Smith wrote: > Of course, most of Python user community are wimps and shy away > from big hairy regexes [ducking and running]. I prefer the simple, lumbering regular expressions like those in the original Night of the Regular Expressions. The fast, powerful ones from programs l

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Roy Smith
In article , Devin Jeanpierre wrote: > On Fri, May 24, 2013 at 8:58 AM, Malte Forkel wrote: > > As a first step, I am looking for a parser for Python regular > > expressions, or a Python regex grammar to create a parser from. > > the sre_parse module is undocumented, but very usable. > > > Bu

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Roy Smith
In article , Malte Forkel wrote: > Finding out why a regular expression does not match a given string can > very tedious. I would like to write a utility that identifies the > sub-expression causing the non-match. My idea is to use a parser to > create a tree representing the complete regular ex

Re: Utility to locate errors in regular expressions

2013-05-24 Thread Devin Jeanpierre
On Fri, May 24, 2013 at 8:58 AM, Malte Forkel wrote: > As a first step, I am looking for a parser for Python regular > expressions, or a Python regex grammar to create a parser from. the sre_parse module is undocumented, but very usable. > But may be my idea is flawed? Or a similar (or better) t

Utility to locate errors in regular expressions

2013-05-24 Thread Malte Forkel
Finding out why a regular expression does not match a given string can very tedious. I would like to write a utility that identifies the sub-expression causing the non-match. My idea is to use a parser to create a tree representing the complete regular expression. Then I could simplify the expressi