Regular Expressions 101

Library entries

IPv4 and port (optional) validator

Vote

1

Regular Expression
pcre

/
\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

Loading markdown...
Submitted by co_Opernicus - 6 years ago