All the aforementioned embedded modes can be placed at the start of a regular expression to enable one or more modes for the complete regular expression. We can also place these modes in the middle of a regex to enable it for a specific group or a remainder of the regex pattern.
We can also combine multiple mode modifiers into a single expression like this:
(?is)
This enables the DOTALL and ignore case modes.