Changed regex to not match two enclosing brackets when they are followed by a non-white space character