Community Patterns

Community Library Entry

1

Regular Expression
Created·2021-07-15 12:40
Flavor·ECMAScript (JavaScript)

/
((?<!<[^>]*)|(?![^<]*>))((?<=^|\W)(a))
/
g
Open regex in editor

Description

Match all words that are not in a tag. Non-matching < and > do not prevent matches. But fails to match terms between < and > if no intervening < or >

Submitted by Michael Chambers