PHP Remove Text Between [ and ] Parentheses

Viewed 4726

I need to remove text included between [ and ] parentheses (and parentheses, too).

For example:

Hello, [how are you]

Must become:

Hello,

And, a string like:

hello, [how][are] you

must become:

hello, you

There is a regula expression to do that?

4 Answers
Related