Monday, March 1st, 2010 •
Related •
Filed Under
Over the last few years, I've occasionally commented on JavaScript's RegExp API, syntax, and behavior on the ES-Discuss mailing list. Recently, JavaScript inventor Brendan Eich suggested that, in order to get more discussion going, I write up a list of regex changes to consider for future ECMAScript standards (or as he humorously put it, have [...]
Read More
Wednesday, February 3rd, 2010 •
Related •
Filed Under
Update (2010-02-25): This contest is now closed.
Last year, Yahoo! engineer and all-around JavaScript badass Nicholas Zakas asked if I was interested in writing a chapter for a new book on JavaScript performance that he was working on. I agreed, and that book, High Performance JavaScript, is now available for preorder at Amazon and other fine [...]
Read More
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
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
Friday, June 20th, 2008 •
Related •
Filed Under
I recently encountered a brain teaser that asked to take an amount of change and return the equivalent in dollars and coins.
Here's the five-minute solution I first came up with.
function makeChange (money) {
var i, num,
output = [],
[...]
Read More