chucknorris/roundhouse — pull request #108 by mpareja (2013-03-23 03:29:39+00:00)
Title: Batch Splitter: Handle trailing comments with single quotes. 

There was a nasty bug in the SQL Server batch splitting regex which caused batches to be split incorrectly. Consider the following contrived example SQL:

select first_name, last_name -- don't bother with middle name
from person
GO
select first_name + ' ' + last_name

The statement splitter would not detect the GO statement because it incorrectly considered the single quote in the trailing comment as a string.

I tightened up the regex and made it a bit more legible for future readers.