(?si)applies the following effective flags to the remainder of the pattern: gmsi s modifier: single line. Allows a dot to match line terminators
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters
Negative Lookbehind(?<!\S) \Sany non-whitespace character
.{0,10}any character, repeated between 0 and 10 times
Negative Lookbehind(?<!\S) \Sany non-whitespace character
\S*any non-whitespace character, repeated any number of times
dogthe literal text dog (case insensitive) \S*any non-whitespace character, repeated any number of times
\Sany non-whitespace character
.{0,10}any character, repeated between 0 and 10 times
\Sany non-whitespace character
g modifier: global. Finds all matches instead of stopping after the first
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string