Singing Potatoes
Friday, 24 March 2006
The Art of Regexp
Spike Jones 1

I put up the following regular expression on my whiteboard, just to see how long it takes before someone here at work identifies its purpose:

((?:\d{4})[A-Z]\d{2}(?:SDC|SMS|MDC)\d{2})

I know \d\d is shorter than \d{2}, but I think the latter is more elegant.


Posted by godfrey (link)
Comments
(Runs and hides from scary algebra-looking thing)