Regular Expressions 101

Community Patterns

Community Library Entry

11

Regular Expression
ECMAScript (JavaScript)

/
<(a+) (?!(?:href=(["|']+)([http:\/\/])*link\.com([\/])?(.*?)["|'])) *[^>]*>(.*?)[^>]>
/
gm

Description

<a href="yourlink.com">YourLink</a> - not found <a href="anotherlink.com">AnotherLink</a> - found

Submitted by KoT - 9 years ago