Regular expressions pcre2 · Common patterns

IPv4 address (shape only)

Match four groups of 1 to 3 digits. It doesn't check that each is 255 or less.

\b(?:\d{1,3}\.){3}\d{1,3}\b

Official Regular expressions pcre2 documentation

More common patterns commands

All common patterns commands · Regular expressions pcre2 cheatsheet

Was this page helpful?