private string RemoveExtraSpacesBeforeOpeningBracket(string stmt)
{
string spacelessstmt = stmt;
string pattern = @"[A-Za-z0-9_.]+\s+\(";
bool spaces = Regex.IsMatch(stmt, pattern);
if (spaces)//remove extra spaces
{
MatchCollection mc = Regex.Matches(stmt, pattern);
spacelessstmt = Regex.Replace(stmt, @"\s+\(", "(", RegexOptions.None);
}
return spacelessstmt;
}