O'Reilly logo
  • Leomar Scheunemann Júnior thinks this is interesting:

 ^([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])\.
   ([01]?\d\d?|2[0-4]\d|25[0-5])\.([01]?\d\d?|2[0-4]\d|25[0-5])$

From

Cover of Mastering Regular Expressions, 3rd Edition

Note

regular expression to validate IP addresses