Regular Expressions 101

Community Patterns

URL detector

1

Regular Expression
PCRE (PHP <7.3)

/
((http|https|ftp|ftps)\:\/\/|www\.|)[a-zA-Z0-9\-\.]+(\.[a-zA-Z]{2,3}|\.pl|\.net|\.com)(\/\S*)?
/
g

Description

no description available

Submitted by pawel - 9 years ago