I want to remove square brackets from an SQL string, but only where there is no whitespace inside them.
E.g. "SELECT [intId], [The Description]" should return "SELECT intId, [The Description]".
I can get the square brackets without spaces inside with the regular expression:
\[[^\s]*\]
How can the square brackets from these matches be removed in the original string?