[Cialug] some truth to that

jim kraai jimgkraai at gmail.com
Tue May 20 14:05:44 CDT 2014


this is an instance of trying to parse recursive structures

of course, it is possible:
http://www.php.net/manual/en/regexp.reference.recursive.php#95568
http://twiki.org/cgi-bin/view/Blog/BlogEntry201109x3

but possible does not mean advisable

real parsers can tell you where they fail, regexps either match or they
fail without giving useful diagnostic information, so recursive regexps are
very, very difficult to troubleshoot or upgrade



On Tue, May 20, 2014 at 1:48 PM, jim kraai <jimgkraai at gmail.com> wrote:

> http://i.imgur.com/b4nl0BK.jpg
>
>
> On Tue, May 20, 2014 at 1:24 PM, Andrew Denner <linux-list at upeke.com>wrote:
>
>> It can also be abused in horrible ways. as in one of the best
>> stackoverflow
>> questions ever "RegEx match open tags except XHTML self-contained
>> tags<
>> https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454
>> >"
>> which is also the best use of extended characters and sarcasm in an
>> answer.
>>
>>
>>
>>
>> On Tue, May 20, 2014 at 12:20 PM, jim kraai <jimgkraai at gmail.com> wrote:
>>
>> > sometimes i need to generate test data that will later need to match a
>> > regexp
>> >
>> > here are a couple of online tools that take a regexp and generate
>> matching
>> > strings
>> >
>> > https://fent.github.io/randexp.js/
>> > http://uttool.com/text/regexstr/default.aspx
>> >
>> > of course, all of these things will have lots of limitations considering
>> > the nature of the task
>> >
>> > there are other libs to do this in various languages, but they're hard
>> to
>> > find because of the extreme nicheyness
>> >
>> > http://regldg.com/
>> > http://search.cpan.org/dist/Regexp-Genex/lib/Regexp/Genex.pm
>> > http://hackage.haskell.org/package/regex-genex-0.2.1 (related to the
>> perl
>> > pkg?)
>> >
>> >
>> >
>> > On Tue, May 20, 2014 at 11:30 AM, David Champion <dchamp1337 at gmail.com
>> > >wrote:
>> >
>> > > You fail to grasp the ways of the leaning toothpicks, grasshopper.
>> > >
>> > > I don't like regex, would rather use longer but more readable methods.
>> > >
>> > > -dc
>> > >
>> > >
>> > > On Tue, May 20, 2014 at 11:24 AM, jim kraai <jimgkraai at gmail.com>
>> wrote:
>> > >
>> > > > you're right on the money
>> > > >
>> > > > some regex engines even allow in-line comments
>> > > >
>> > > >
>> > > >
>> > > > On Tue, May 20, 2014 at 11:17 AM, Jeffrey Ollie <jeff at ocjtech.us>
>> > wrote:
>> > > >
>> > > > > On Tue, May 20, 2014 at 11:07 AM, jim kraai <jimgkraai at gmail.com>
>> > > wrote:
>> > > > > > http://www.commitstrip.com/en/2014/02/page/4/
>> > > > >
>> > > > > Writing regular expressions isn't _that_ hard, especially if you
>> > build
>> > > > > them up piece by piece.  Also, a solid understanding of their
>> > > > > limitations is essential.
>> > > > >
>> > > > > --
>> > > > > Jeff Ollie
>> > > > > _______________________________________________
>> > > > > Cialug mailing list
>> > > > > Cialug at cialug.org
>> > > > > http://cialug.org/mailman/listinfo/cialug
>> > > > >
>> > > > _______________________________________________
>> > > > Cialug mailing list
>> > > > Cialug at cialug.org
>> > > > http://cialug.org/mailman/listinfo/cialug
>> > > >
>> > > _______________________________________________
>> > > Cialug mailing list
>> > > Cialug at cialug.org
>> > > http://cialug.org/mailman/listinfo/cialug
>> > >
>> > _______________________________________________
>> > Cialug mailing list
>> > Cialug at cialug.org
>> > http://cialug.org/mailman/listinfo/cialug
>> >
>> _______________________________________________
>> Cialug mailing list
>> Cialug at cialug.org
>> http://cialug.org/mailman/listinfo/cialug
>>
>
>


More information about the Cialug mailing list