Tuesday, June 23rd, 2009 •
Related •
Filed Under
After stalling for nearly a year, I've finally released XRegExp 1.0, the next generation of my JavaScript regular expression library. Although it doesn't add support for lookbehind (as I've previously suggested) due to what would amount to significant inherent limitations, it fixes a couple bugs, corrects even more cross-browser regex inconsistencies, and adds a suite [...]
Read More
Thursday, June 4th, 2009 •
Related •
Filed Under
As of today, Regular Expressions Cookbook (written by Jan Goyvaerts and me, and published by O'Reilly Media) is listed as In Stock on Amazon.com and other fine bookstores. The book covers seven regular expression flavors (.NET, Java, JavaScript, Perl, PCRE, Python, and Ruby) and eight programming languages (C#, Java, JavaScript, Perl, PHP, Python, Ruby, and [...]
Read More
Saturday, March 7th, 2009 •
Related •
Filed Under
Just a quick post to note that Regular Expressions Cookbook by Jan Goyvaerts and me (published by O'Reilly Media) is available for pre-order on Amazon.com, Amazon.co.uk, and many other places. It was mostly completed at the end of January, and is coming out May 15 June 4.
Regular Expressions Cookbook contains a full regex tutorial (presented [...]
Read More
Friday, August 1st, 2008 •
Related •
Filed Under
I've released a simple plugin for XRegExp (my JavaScript regex library) that adds support for Unicode properties and blocks to JavaScript regular expressions. It uses the Unicode 5.1 character database, which is the very latest version.
The Unicode plugin enables the following Unicode properties/categories in any XRegExp:
\p{L} — Letter
\p{M} — Mark
\p{N} — Number
\p{P} — Punctuation
\p{S} — [...]
Read More
Thursday, June 12th, 2008 •
Related •
Filed Under
How many times have you needed to run multiple replacement operations on the same string? It's not too bad, but can get a bit tedious if you write code like this a lot.
str = str.
replace( /&(?!#?\w+;)/g , '&' ).
replace( /"([^"]*)"/g , '“$1”' ).
replace( /</g [...]
Read More