i modifier: insensitive. Matches without distinguishing uppercase and lowercase letters
m modifier: multiline. Causes ^ and $ to match the start and end of each line, not only the start and end of the string
g modifier: global. Finds all matches instead of stopping after the first
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