Categorized | News

Eye-watering Regular Expressions

Posted on 16 April 2003 by Demian Turner

((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]d{2})|
([2-9]d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]d{2})|
([2-9]d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1-9])([/])((1[8-9]d{2})|
([2-9]d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)
([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])
(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|
(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])
([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))

:-)  Yes that is a regular expression.  I’ve put this up just to cheer myself up really, after a particularly long week of hunting down bugs.  The moral of the story: things could be worse!

And if you interested in a recipe book-like site with 258 regular expressions catalogued for your convenience, read on.

Bookmark and Share

1 Comments For This Post

  1. Loren Helgeson Says:

    Wow. That’s awesome!

Leave a Reply

Categories

Books

Demian Turner's currently-reading book recommendations, reviews, favorite quotes, book clubs, book trivia, book lists

Facebook