Trying to parse an SQL string and pull out the parameters.
Ex: "select * from table where [Year] between @Yr1 and @Yr2"
I want to pull out "@Yr1" and "@Yr2"
I have tried many patterns, but none has worked, such as:
matches = Regex.Matches(sSQL, "\b@\w*\b")
and
matches = Regex.Matches(sSQL, "\b\@\w*\b")
Any help?