Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(((http|https):\/\/)|(\/)|(..\/))(\w+:?\w*@)?(\S+)(:\d+)?(\/|\/([\w#:.?+=&%@!\-\/]))?
/

Description

Validate one URL

HTTP and HTTPS

Submitted by Joaquim - 2 years ago