Friday, May 16th, 2008 •
Related •
Filed Under
Cüneyt Yılmaz's JRX is a cool JavaScript regex tester inspired by the RX tool of Komodo IDE. Cüneyt recently added my XRegExp library to his tester, so JRX is now a nice and easy way to test XRegExp's singleline and extended modes, as well as named capture and other XRegExp-provided syntax. Check it out!
As for [...]
Read More
Sunday, April 20th, 2008 •
Related •
Filed Under
If you haven't seen the prior versions, XRegExp is an MIT-licensed JavaScript library that provides an augmented, cross-browser implementation of regular expressions, including support for additional modifiers and syntax. Several convenience methods and a new, powerful recursive-construct parser that uses regex delimiters are also included.
Here's what you get beyond the standard JavaScript regex features:
Added regex [...]
Read More
Sunday, April 13th, 2008 •
Related •
Filed Under
The bottom line of this blog post is that Internet Explorer incorrectly increments a regex object's lastIndex property after a successful, zero-length match. However, for anyone who isn't sure what I'm talking about or is interested in how to work around the problem, I'll describe the issue with examples of iterating over each match in [...]
Read More
Monday, March 24th, 2008 •
Related •
Filed Under
Here's one of the oddest and most significant regex bugs in Internet Explorer. It can appear when using optional elision within lookahead (e.g., via ?, *, {0,n}, or (.|); but not +, interval quantifiers starting from one or higher, or alternation without a zero-length option). An example in JavaScript:
/(?=a?b)ab/.test("ab");
// Should return true, but IE 5.5 [...]
Read More
Wednesday, March 19th, 2008 •
Related •
Filed Under
Regexes suck at math. To a regex engine, the characters 0 through 9 are no more special than any others.
I should mention that there are a couple exceptions. Perl and PCRE allow dynamic code to be run at any point during the matching process, which presents a great deal of extra potential. Perl does this [...]
Read More