Sorry, if u thought I meant it that way. I meant to say that I have tested my solution and it does work. So it is solved for sure.
Many of the solutions above may work, but I have not tested them so i cannot say for sure.
Actually, upon testing
#\[.*\]#
, what Crayon Violent and MrAdam have said, I would say it is not recommended. I say this because it will also remove what comes before the brackets.
ex. fri[hello]day will become "day".
If that does not affect you, then feel free to use it.
Upon using
(\\[.*?\\])
, you will get "friday"
Just throwing it out there