Regular Expressions 101

Community Patterns

match all #tag except specified

0

Regular Expression
ECMAScript (JavaScript)

/
(#(?!thankyouburger)[\w]+)
/
g

Description

in the example, I'm matching all the #tags except **#thankyouburger **. very useful for when you want to strip out all but one tag

Submitted by Pavel Dominguez - 7 years ago