Description
This regex will do the following:
- match all the quoted words on the first line after the
exec
keyword
- other words on other lines will be ignored
- allow the source string to be all on one line.
Notes
- you'll have to be careful using
insert
as an anchor. Consider this string edge case: exec GetNextSequence 'abc', @Insert, @brokerId out, 'fds'
- the infinite lookbehind
(?<=^exec.*?)
assumes that you're using the .net Regex engine as many languages do not support repetition characters in lookbehinds.
The Regex
(?<=^exec.*?)'((?:(?!'|\n).)*)'
Explanation

NODE EXPLANATION
--------------------------------------------------------------------------------
(?<= look behind to see if there is:
--------------------------------------------------------------------------------
^ the beginning of the string
--------------------------------------------------------------------------------
exec 'exec'
--------------------------------------------------------------------------------
.*? any character except \n (0 or more times
(matching the least amount possible))
--------------------------------------------------------------------------------
) end of look-behind
--------------------------------------------------------------------------------
' single quote character
--------------------------------------------------------------------------------
( group and capture to \1:
--------------------------------------------------------------------------------
(?: group, but do not capture (0 or more
times (matching the most amount
possible)):
--------------------------------------------------------------------------------
(?! look ahead to see if there is not:
--------------------------------------------------------------------------------
' single quote character
--------------------------------------------------------------------------------
| OR
--------------------------------------------------------------------------------
\n '\n' (newline)
--------------------------------------------------------------------------------
) end of look-ahead
--------------------------------------------------------------------------------
. any character
--------------------------------------------------------------------------------
)* end of grouping
--------------------------------------------------------------------------------
) end of \1
--------------------------------------------------------------------------------
' single quote character
Examples
Sample Text
exec GetNextSequence 'abc', @brokerId out, 'fds'
insert into [ttt](id, code, description, startDate, endDate)
values (@bid, @code, @code, getdate(), '099999')
Sample Capture Groups
[0][0] = 'abc'
[0][1] = abc
[1][0] = 'fds'
[1][1] = fds