Improve sql statement ending regex to account for trailing comments