Regular Expressions 101

Community Patterns

Match URLS http|https www|ww|www3 etc

1

Regular Expression
PCRE (PHP <7.3)

/
^((http|https)\:\/\/|)([\w|\-]+\.)+\w+($|[\w\-\/\.]+$|[\w\/\.]+\?[\w\=\&\.]+$)
/
gmi

Description

match various web urls

Submitted by ganey - 8 years ago