Advanced Regular Expressions
smashingmagazine.com
smashingmagazine.com
Something which is ironic, and also gets back to basic CS concepts, is that modern scripting languages have added so much power to "Regular Expressions," that they are no longer strictly Regular Expressions. They are no longer equivalent to Finite Automata. "Regular Expressions" in many cases are outright Turing Complete.
And so the abuse of our field's terminology continues.
... what?
Is there a page that shows a mapping between different implementations of regular expressions and which languages and applications they're used in? Is there a better way to figure these things out than hunt for documentation every time?
Of course, Vim is one of the few regex engines to support variable width negative look-behinds, so I guess that counts for something. :)
It's not in Vim.org. I had the code floating around with an MIT license, but it's offline right now. I thought about building a page where you could do the translation (I figured Perl -> Vim is what people would want more) or just use a simple GET request from other code.
Maybe I should do the Perl -> Vim bit and make it available.
But I think it wouldn't be hard to do a plugin that translates a pcre into a Vim regex, allowing you to search or replace using pcres.
My code though is not integrated with Vim, it takes a free floating regex and converts it. I used it to convert all the regexes in Vim syntax files and build a syntax highlighter. It was a silly project, just for fun.
However, captures in the recursion can't be retrieved after it gets returned. This may not be surprising, but it does reduce the power of recursion somewhat.
This one still had some quite interesting pieces of information that I hadn't heard of or hadn't studied in detail yet.