Usually, when a regex takes forever to match (or, more likely, find out that it doesn't match) it's because of catastrophic backtracking. There are a few instances in your regex that might be prone to this, depending on what your input looks like. I have taken your regex and cleaned it up a little, removing lots of unnecessary quantifiers and alternations. This regex:
(?<KEEP1>^\s*--.*$)|(?<KEEP1>/\*[\S\s]*?\*/)|(?<KEEP1>'[^']*')|(?<KEEP1>\s)(?<BATCHSPLITTER>GO)(?<KEEP2>\s|$)
will match exactly the same as your old regex, but it's less complex and should be more stable. Please give it a try.
To handle escaped apostrophes within strings ('It\'s something else!'
) correctly, you would need to change the regex:
(?<KEEP1>^\s*--.*$)|(?<KEEP1>/\*[\S\s]*?\*/)|(?<KEEP1>'(?:\\.|[^'\\])*')|(?<KEEP1>\s)(?<BATCHSPLITTER>GO)(?<KEEP2>\s|$)