Regular Expressions 101

Community Patterns

href parse v2

0

Regular Expression
ECMAScript (JavaScript)

/
<a\s*(?:href=[\'"]([^\'"]+)[\'"])?\s*(?:title=[\'"]([^\'"]+)[\'"])?.*?>((?:(?!<\/a>).)*)<\/a>
/
gi

Description

matches href, title, innerhtml

Submitted by chrysls - 8 years ago