Regular Expressions 101

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

~
\b(?:https?://)?(?:(?i:[a-z]+\.)+)[^\s,]+\b
~
g

Description

Regex for URLs

Submitted by anonymous - 7 years ago