As the title said, is there a way to prevent specific characters in "match" in .tmLanguage syntax highlighting? Like, for example, match everything but w and s.
I believe [^ws]
is what you're looking for. ^
is a regex negation operator. So, just like you'd use [abc]
to match either a, b, or c, adding ^
at the beginning negates it. Just make sure it's inside the square brackets.