Flagrant Badassery

A JavaScript and regular expression centric blog

Archive for March, 2008

A JScript/VBScript Regex Lookahead Bug

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 […]

Read More

Solving Algebraic Equations Using Regular Expressions

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 […]

Read More

JavaScript Roman Numeral Converter

While looking for something quick to do during a brief internet outage, I wrote some code to convert to and from Roman numerals. Once things were back up I searched for equivalent code, but only found stuff that was multiple pages long, limited the range of what it could convert, or both. I figured I […]

Read More

Highlights From SXSWi 2008

I'm back from the SXSW Interactive conference, which offered a pretty decent selection of panels and good times. I ended up attending about 20 panels over three and a half days, and about as many bars and after-parties. Here were some of the personal highlights, for anyone who's interested. The first session I attended on […]

Read More

SXSW Interactive 2008

Despite flight cancellations and a last-minute work crisis, I've been in Austin, Texas with a couple work buddies since late-Friday to attend the packed-out South by Southwest Interactive conference. It's been a lot of fun so far. 11 panels into it, the standout for me has easily been 10 Things We've Learned at 37signals by […]

Read More