Stop writing URLs as strings. Express them with VerbalResourceLocator:<p><pre><code> var vrl = VRL().
schema("https").
tld("com").
sld("ycombinator").
subdomain("news").
path("/item").
query({"id": "6164276"});
</code></pre>
Seriously though, Verbal Expression is a great way to turn terse regexps into un-reusable verbiage that barely improves readability.
I had never heard of this before.
The stated goal is to simplify difficult regular expressions, but the examples seem to be more complicated than the corresponding regexes. Maybe I'm just old school.<p>I'm not sure that someone who relies on this would be able to debug the resulting generated regex when something doesn't work as expected.
I'm always a bit wary of posts that tell me to "Stop doing X". I'm also pretty comfortable with regular expressions. They take you outside of the procedural comfort zone, but are a valuable tool that will pay off to learn.<p>Still, it's worth a shot trying to create a tool like this. What I don't get is how they would handle subexpressions.
pyparsing (<a href="http://pyparsing.wikispaces.com/" rel="nofollow">http://pyparsing.wikispaces.com/</a>) is more object-oriented and composable, and it can parse recursive grammars.