g modifier: global. Finds all matches instead of stopping after the first
i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters
x modifier: extended. Ignores unescaped whitespace and comments outside character classes
X modifier: eXtra. A \ followed by a letter with no special meaning causes an error
s modifier: single line. Allows a dot to match line terminators
u modifier: unicode. Treats the pattern and subject as UTF-16
U modifier: Ungreedy. Quantifiers are lazy by default. A trailing ? makes a quantifier greedy
A modifier: Anchored. Forces the pattern to match only at the start of the search
J modifier: Allow duplicate subpattern names
D modifier: Dollar. Forces $ to match only at the end of the string instead of also before a final line terminator. This option is ignored if the m-flag is set
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string