Regular Expressions 101

Community Patterns

Community Library Entry

7

Regular Expression
ECMAScript (JavaScript)

/
^((1?[\d]?[\d]|2([0-4][\d]|5[0-5]))[.]){3}(1?[\d]?[\d]|2([0-4][\d]|5[0-5]))$
/

Description

Matches all valid IP addresses from 0.0.0.0 to 255.255.255.255

Submitted by Ryan Plummer - 9 years ago