public enum PythonREMode extends Enum<PythonREMode>
In Python, the standard regular expression engine behaves differently based on whether the
pattern is a 'str' (string) or a 'bytes' (immutable byte buffer) object. Since all regexes are
represented as Strings in TRegex, we cannot dispatch on the type of the pattern. Instead,
we dispatch on values of this enumeration.
Enum.EnumDesc<E extends Enum<E>>| Enum Constant and Description |
|---|
Bytes
Bytes-based (binary) patterns, where the Python regular expression was given as a 'bytes'
object.
|
Str
String-based patterns, where the Python regular expression was given as a 'str' object.
|
| Modifier and Type | Method and Description |
|---|---|
static PythonREMode |
fromEncoding(Encodings.Encoding encoding) |
static PythonREMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PythonREMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PythonREMode Str
public static final PythonREMode Bytes
public static PythonREMode[] values()
public static PythonREMode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static PythonREMode fromEncoding(Encodings.Encoding encoding)