Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<=href=")(.+)(?="(( [a-z]+=)|>))
/
Ugm

Description

Even though using a delimiter within a string, without escaping it, is an illegal character, sometimes this still happens and we need to extract a HTML value.

Submitted by Sean O'Mahoney - 4 years ago