Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

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

Description

This will force a cidr block in the 10.x.0.0 range. Very useful if you restrict your cidr block to 10.x.0.0 in cloudformation (AWS).

Submitted by Alex Dixon - 7 years ago