Regular Expressions 101

Community Patterns

Community Library Entry

-1

Regular Expression
Java 8

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

Description

This RE is divided into four parts. The first three parts are acceptable numbers from 0 to 255 followed by "." The last part is an acceptable number but not followed by "."

Submitted by EMAM1999 - 4 years ago