Embedded flag expressions can be used at the beginning of the pattern. The following notes have been collated from Sun's JavaDoc[1].
(?i) case insensitive
(?m) multiline mode
By default, the regular expressions ^ and $ ignore line terminators and only match at the beginning and the end, respectively, of the entire input sequence. If MULTILINE mode is activated then ^ matches at the beginning of input and after any line terminator except at the end of input. When in MULTILINE mode $ matches just before a line terminator or the end of the input sequence.
(?s) dotall mode
In dotall mode, the expression . matches any character, including a line terminator. By default this expression does not match line terminators.
(The s is a mnemonic for "single-line" mode, which is what this is called in Perl.)
(?u) unicode case
Enables Unicode-aware case folding.
When this flag is specified then case-insensitive matching, when enabled by the CASE_INSENSITIVE flag, is done in a manner consistent with the Unicode Standard. By default, case-insensitive matching assumes that only characters in the US-ASCII charset are being matched.
Specifying this flag may impose a performance penalty.