Regular Expressions 101

IPv4 and port (optional) validator

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(?::[0-9]{1,4})?\b
/

Description

No description provided.

Submitted by co_Opernicus