Oisín Hurley's Weblog

old dog, new tricks

Awesome Regex Ninja

with one comment


^(0*|-?0*[1-9]\d{0,8}|-?0*1\d{9}|-?0*20\d{8}|-?0*21[0-3]\d{7}|-?0*214[0-6]\d
{6}|-?0*2147[0-3]\d{5}|-?0*21474[0-7]\d{4}|-?0*214748[0-2]\d{3}|-?0*2147483[
0-5]\d{2}|-?0*21474836[0-3]\d|-?0*214748364[0-7]|-0*2147483648)$

Advertisements

Written by oisinhurley

December 20, 2007 at 11:06 am

Posted in Coding

One Response

Subscribe to comments with RSS.

  1. Pretty good. Although, nothing I’ve seen beats this awesome regex for RFC822 email addresses.

    Alex Miller

    December 20, 2007 at 8:33 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: