(?s)applies the following effective flags to the remainder of the pattern: sg s modifier: single line. Allows a dot to match line terminators
\S*any non-whitespace character, repeated any number of times
\(the literal ( (4010 / 508 / 2816)
.*any character, repeated any number of times
refthe literal text ref (case sensitive) \s*any whitespace character, repeated any number of times
SqlConnectionthe literal text SqlConnection (case sensitive) s modifier: single line. Allows a dot to match line terminators
g modifier: global. Finds all matches instead of stopping after the first