Lookahead Quantification: An utterly loopy trick
Sufficiently adventurous readers may have come across the technique of forward or nested references to do some tricky things with regex, such as non-recursively match a palindrome, match anbn, and...
View ArticleMatch Nested Brackets with Regex: A new approach
My first blog post was a bit of a snoozefest, so I feel I ought to make this one a little shorter and more to the point. I'm going to show you how to do something with regular expressions that's long...
View ArticleHow to Match "A B C" where A+B=C: The Beast Tamed
A regex I submitted to Reddit recently climbed to the top of /r/programming and made quite a few heads explode in the process. As delightful as this was, I couldn't help but feel a little guilty for...
View ArticleHow to match "A B C" where A+B=C: The Beast Reborn
A while ago, I created a regex to verify addition of two non-negative integers, and unleashed the unholy mess onto reddit. Reactions were fierce, heads exploded, etc. and so I immediately took to...
View ArticleFor Regex Purists: Can Formal Regular Expressions Be Fun?
Pre Ramble Can formal regular expressions be fun? This is a question I asked myself recently. Modern regex engines have strayed a ways away from regular expressions as they are formally defined,...
View ArticleVariable-Length Lookbehinds: actually possible in Perl/PCRE!
Get strapped in, because this is as close as you're going to get to breaking news in the world of regular expressions.You know what the best thing is about being involved in regex circles? It's not the...
View Article
More Pages to Explore .....