Options for Java Regular Expressions
Regular expressions can have options (also known as flags) that modify their behavior. Each engine supports a different set of options.
Option | Description | Backend value | Portable value |
---|
CANON_EQ | Canonical equivalence. | 128 | (not portable) |
CASE_INSENSITIVE | Case-insensitive matching. | 2 | ignorecase |
COMMENTS | Allow whitespace and comments in pattern. | 4 | comments |
DOTALL | Enables dotall mode. | 32 | (not portable) |
LITERAL | Literal parsing of the pattern. | 16 | (not portable) |
MULTILINE | Multiline mode. | 8 | (not portable) |
UNICODE_CASE | Unicode-aware case folding. | 64 | (not portable) |
UNIX_LINES | Unix lines mode. | 1 | (not portable) |