Regular Expressions 101

Community Patterns

URL validation with http/https

0

Regular Expression
PCRE (PHP <7.3)

/
^(http|https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,3}|www\.[^\s]+\.[^\s]{2,3})$
/

Description

Loading markdown...
Submitted by Gunjan - 9 years ago