The following selects the part between the GO's and ommits GO's in literals like 'GO':
(?<=GO)(.*?('.*')?)*(?=(?:(?<!--[^\n]*)GO|$))