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).
You forgot to escape the final end bracket:
\[[^\]]+\]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With