remove the leading and trailing spacing before and after parenthesis