Community Patterns

Community Library Entry

3

Regular Expression
Created·2015-02-02 16:57
Flavor·ECMAScript (JavaScript)

/
\.(?!html?)([a-z]{0,3}|[a-z]{0,4})$
/
gm
Open regex in editor

Description

Allow you to check if the JavaScript location.pathname is a link required adding a target="_blank".

Submitted by Bruno Lesieur