eriksan :
Apart from Pattern.CASE_INSENSITIVE
, how do I also chose Pattern.MULTILINE
in the call to Pattern.compile()?
Pattern tokenPattern = Pattern.compile("Hi", Pattern.CASE_INSENSITIVE);
Hovercraft Full Of Eels :
They are int flags, a bit-mask per the Pattern API, and so using bitwise-or, |
, should work.
flags - Match flags, a bit mask that may include CASE_INSENSITIVE, MULTILINE, DOTALL, ...
For example:
Pattern tokenPattern = Pattern.compile("Hi", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
To find many similar questions and answers, please check out this Google search link: