Global, case, multiline, dotAll, Unicode, sticky, and indices flags change the search model
The g flag finds repeated matches, m changes anchors around line boundaries, s lets dot include line terminators, u improves Unicode interpretation, y requires a match at the current position, and d exposes indices. Enable only flags the production code uses and copy the final pattern with them.