What do the global (g) and multiline (m) flags change during validation testing?
The global flag (`g`) ensures the regex engine finds all matching occurrences across the string rather than stopping at the first instance. The multiline flag (`m`) alters line anchors (`^`) and (`$`) to match the beginning and end of individual lines within a text block, instead of treating the entire string as a single line.