Regular Expressions 101

Extract Dirty `href` Values in HTML

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
(?<=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