Regular Expressions 101

Community Patterns

Regular expression for both IPv6 and IPv4 URL

-2

Regular Expression
PCRE (PHP <7.3)

/
(?=(([0-9a-fA-F]{4}):([0-9a-fA-F]{4}):([0-9a-fA-F]{4})::([0-9a-fA-F]{4}))|(^\s*(((https?(?![0-9][a-zA-Z]):)?(//)((w{3}?).)?)?)([\w-]+\.)+[\w-]+(\/[\w- ./?%&amp;=]*)?\s*$))
/
regular expression

Description

no description available

Submitted by Henry Li - 10 years ago