RegexFlags Class

public final class RegexFlags
extends ExpandableStringEnum<RegexFlags>

Defines a regular expression flag that can be used in the pattern analyzer and pattern tokenizer.

Field Summary

Modifier and Type Field and Description
static final RegexFlags CANON_EQ

Enables canonical equivalence.

static final RegexFlags CASE_INSENSITIVE

Enables case-insensitive matching.

static final RegexFlags COMMENTS

Permits whitespace and comments in the pattern.

static final RegexFlags DOT_ALL

Enables dotall mode.

static final RegexFlags LITERAL

Enables literal parsing of the pattern.

static final RegexFlags MULTILINE

Enables multiline mode.

static final RegexFlags UNICODE_CASE

Enables Unicode-aware case folding.

static final RegexFlags UNIX_LINES

Enables Unix lines mode.

Constructor Summary

Constructor Description
RegexFlags()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of RegexFlags value.

Method Summary

Modifier and Type Method and Description
static RegexFlags fromString(String name)

Creates or finds a RegexFlags from its string representation.

static Collection<RegexFlags> values()

Gets known RegexFlags values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

CANON_EQ

public static final RegexFlags CANON_EQ

Enables canonical equivalence.

CASE_INSENSITIVE

public static final RegexFlags CASE_INSENSITIVE

Enables case-insensitive matching.

COMMENTS

public static final RegexFlags COMMENTS

Permits whitespace and comments in the pattern.

DOT_ALL

public static final RegexFlags DOT_ALL

Enables dotall mode.

LITERAL

public static final RegexFlags LITERAL

Enables literal parsing of the pattern.

MULTILINE

public static final RegexFlags MULTILINE

Enables multiline mode.

UNICODE_CASE

public static final RegexFlags UNICODE_CASE

Enables Unicode-aware case folding.

UNIX_LINES

public static final RegexFlags UNIX_LINES

Enables Unix lines mode.

Constructor Details

RegexFlags

@Deprecated
public RegexFlags()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of RegexFlags value.

Method Details

fromString

public static RegexFlags fromString(String name)

Creates or finds a RegexFlags from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding RegexFlags.

values

public static Collection<RegexFlags> values()

Gets known RegexFlags values.

Returns:

known RegexFlags values.

Applies to