Regular Expressions 101

Community Patterns

123...6

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)
/
gm

Description

Extract links from text simple as that.

Submitted by anonymous - 18 hours ago