News for hackers. Stuff that matters.
Re:RegExpBuilder – Create regular expressions using chained ... by jgalt212 on Wednesday February 11, 2015 @12:18PM (#9034076)
Definitely a debugable way to write regexes. Whenever I have to maintain a hairy regex, I like to plot the regex as a railroad diagram.

These web based tools can do it:

https://www.debuggex.com/

http://jex.im/regulex/

Re:RegExpBuilder – Create regular expressions using chained ... by philjohn on Wednesday February 11, 2015 @02:52PM (#9035264)
Love it - just visualised the PCRE generated from the EBNF for the N-Triples RDF serialisation format[1] :)

https://www.debuggex.com/r/Yxqws81Uif-BGBN8

Important note - this is built up programmatically, it's not just a string dumped in a parser!

[1] http://www.w3.org/TR/n-triples/#n-triples-grammar

Re:RegExpBuilder – Create regular expressions using chained ... by jgalt212 on Wednesday February 11, 2015 @05:47PM (#9036208)
That is one hairy regex. Now the inverse would be even better. You modify the railroad chart and the regex updates.
Re:RegExpBuilder – Create regular expressions using chained ... by philjohn on Monday February 16, 2015 @06:00AM (#9056265)
Fairly hairy, yes, but if you follow the railroad tracks, it's quite succint for what it's doing!