Visual Studio find and replace right square bracket ] in character class You forgot to escape the final end bracket: \[[^\]]+\]