Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
((?<=href="\/)(.+(?=\.(doc|pdf)))|(?<=src=")((http|https).+(?=\/(v2|userfiles)\/)))
/
g

Description

Use look-behind look-ahead groups

Submitted by anonymous - 5 years ago