Regular Expressions 101

Community Patterns

Your search did not match anything

Community Library Entry

1

Regular Expression
ECMAScript (JavaScript)

/
^(25[0-5]|2[0-4][0-9]|1?[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1?[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1?[1-9]?[0-9])\.(25[0-5]|2[0-4][0-9]|1?[1-9]?[0-9])$
/
gm

Description

An IPv4 expression that doesn't allow leading zeros in octets. 10.0.0.1 will pass 10.0.0.01 shouldn't pass

Submitted by machfist - 18 days ago