public class RegexpUtil
extends java.lang.Object
Constructor and Description |
---|
RegexpUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
asOptions(boolean caseSensitive)
Convert flag to regex options.
|
static int |
asOptions(boolean caseSensitive,
boolean multiLine,
boolean singleLine)
Convert flags to regex options.
|
static int |
asOptions(java.lang.String flags)
convert regex option flag characters to regex options
gRegexp.REPLACE_ALL
iRegexpMatcher.MATCH_CASE_INSENSITIVE
mRegexpMatcher.MATCH_MULTILINE
sRegexpMatcher.MATCH_SINGLELINE
|
static boolean |
hasFlag(int options,
int flag)
Check the options has a particular flag set.
|
static int |
removeFlag(int options,
int flag)
Remove a particular flag from an int value contains the option flags.
|
public static boolean hasFlag(int options, int flag)
options
- an int
valueflag
- an int
valuepublic static int removeFlag(int options, int flag)
options
- an int
valueflag
- an int
valuepublic static int asOptions(java.lang.String flags)
flags
- the string containing the flagspublic static int asOptions(boolean caseSensitive)
caseSensitive
- opposite of RegexpMatcher.MATCH_CASE_INSENSITIVEpublic static int asOptions(boolean caseSensitive, boolean multiLine, boolean singleLine)
caseSensitive
- opposite of RegexpMatcher.MATCH_CASE_INSENSITIVEmultiLine
- RegexpMatcher.MATCH_MULTILINEsingleLine
- RegexpMatcher.MATCH_SINGLELINE