Regular Expressions 101

match all #tag except specified

Open Workspace
  • JavaScript
  • Substitution
0

Regular Expression

/
(#(?!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