Flag options
The following flags control various aspects of regular expression matching. The flag values may be specified at the time that an expression is compiled into a RegexPattern object, or they may be specified within the pattern itself using the (?ismx-ismx) pattern options.
Flag (pattern) | Flag (API constant) | Description |
---|---|---|
i | UREGEX_CASE_
INSENSITIVE |
If set, matching take place in a case-insensitive manner. |
x | UREGEX_COMMENTS | If set, allow use of white space and #comments within patterns. |
s | UREGEX_DOTALL | If set, a "." in a pattern matches a line terminator in the input text. By default, it does not. Note that a carriage-return / line-feed pair in text behaves as a single line terminator, and matches a single "." in a RE pattern |
m | UREGEX_MULTILINE | Control the behavior of "^" and "$" in a pattern. By default these match only at the start and end, respectively, of the input text. If this flag is set, "^" and "$" also match at the start and end of each line within the input text. |