Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2018-02-19 20:58
Flavor·JavaScript

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

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