Visual Studio find and replace right square bracket ] in character class
regex, visual-studio-2010
Solution
You forgot to escape the final end bracket:
\[[^\]]+\]
Problem
I want to make a negated character class to match a square bracket tag like this [square bracket tag]. The problem is, the ] character ends the character class! I tried ``` \[[^\]]+] ``` but I get a syntax error when I run it. (This is in the find and replace regex engine which is slightly different than the standard .NET engine fyi).