Re:Stop writing Regular Expressions – Express them with Verb...
by antichaos on Tuesday August 06, 2013 @12:34AM
(#6164810)
Stop writing URLs as strings. Express them with VerbalResourceLocator:
Seriously though, Verbal Expression is a great way to turn terse regexps into un-reusable verbiage that barely improves readability.
[ Parent
| on HN ]
Re:Stop writing Regular Expressions – Express them with Verb...
by rtpg on Tuesday August 06, 2013 @04:25AM
(#6165432)
Speak for yourself, this is a lot clearer for me. I'm used to navigating grammars, but I can't deal with regex (way too terse). Especially when I'm not just matching, but I want to extract info. Some verbosity can go a long way to making things clearer.
Don't know if this is the solution I'm looking for though
Re:Stop writing Regular Expressions – Express them with Verb...
by gojomo on Tuesday August 06, 2013 @06:47AM
(#6165816)
If the terse run-together-ness of usual regexes is unclear, you may also want to look into 'freespace' formatting... which lets you insert insignificant whitespace to break the regex into logical groups/lines, and even add inline comments: