Regular Expressions 101

Community Patterns

Community Library Entry

4

Regular Expression
PCRE (PHP <7.3)

/
(?:startString|\G)[^<>]*+\K(?:<a>([^<>]++)</a>)(?=(?:(?!startString).)*?endString)
/
gsi

Description

Get stuff inside <a> tags, which are between certain words

Submitted by Jerry - 11 years ago