Tuesday 16 September 2003 — This is more than 21 years old. Be careful.
Just when you thought regular expressions were powerful and confusing enough, comes Reversing regular expressions. The idea is that if a match is too hard to make going forward through the string, then reverse the string first, apply a reversed regex to it, and finally reverse the resulting match. Wow.
Update (thanks to Simon, who shows Python for the technique): I forgot to mention that this technique is called “sexeger” (“regexes” backwards, get it?), and here’s japhy’s authoritative treatise on the subject.
Comments
Oops, there goes my brain... ;-)
Add a comment: