Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-03-12 08:40
Flavor·Python

r"
(?:\b|^)((?:(?:(?:\d)|(?:\d{2})|(?:1\d{2})|(?:2[0-4]\d)|(?:25[0-5]))\.){3}(?:(?:(?:\d)|(?:\d{2})|(?:1\d{2})|(?:2[0-4]\d)|(?:25[0-5]))))(?:\b|$)
"
g
Open regex in editor

Description

Allows exaclty 4 groups of digits in the range 0..255 seperated by . characters

Submitted by Steve (Gadget) Barnes