Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?:ht|f)tps?:\/\/\w+\.\w{2}+[\/\w-.]+
/
gi

Description

An advanced URL regex for http(s) and ftp.

Submitted by Matthias Weiß - 9 years ago