object Regex
- Alphabetic
- By Inheritance
- Regex
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def compile(regexes: Seq[String], flags: Int = 0): Seq[CompiledRegex]
Compiles a set of regular expressions in the same Universe, with the given flags.
Compiles a set of regular expressions in the same Universe, with the given flags. Scala version.
- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def compile(regexes: List[String]): List[CompiledRegex]
Compiles a set of regular expressions in the same Universe.
Compiles a set of regular expressions in the same Universe. Java version.
- def compile(regexes: List[String], flags: Int): List[CompiledRegex]
Compiles a set of regular expressions in the same Universe, with the given flags.
Compiles a set of regular expressions in the same Universe, with the given flags. Java version.
- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def compile(regex: String): CompiledRegex
Compiles a set of regular expressions in the same Universe.
- def compile(regex: String, flags: Int): CompiledRegex
Compile a regex from a string, using it's own Universe, with the given flags.
Compile a regex from a string, using it's own Universe, with the given flags.
- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def compileParsed(parsedRegex: ParsedRegex, universe: Universe): CompiledRegex
Compile a regex parsed using one of the
parse
methods.Compile a regex parsed using one of the
parse
methods.In general, this method is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create). - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def nullRegex(u: Universe): Regex
Create a regular expression that does not match anything.
Create a regular expression that does not match anything. Note that that is different from matching the empty string. Despite the theoretical equivalence of automata and regular expressions, in practice there is no regular expression that does not match anything.
- def parse(regexes: List[String], flags: Int): List[ParsedRegex]
Parse a set of regular expressions from a string, with the given flags.
Parse a set of regular expressions from a string, with the given flags. Java version.
In general, this method is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create).- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def parse(regexes: Seq[String], flags: Int = 0): Seq[ParsedRegex]
Parse a set of regular expressions from a string, with the given flags.
Parse a set of regular expressions from a string, with the given flags. Scala version.
In general, this method is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create).- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def parse(regex: String, flags: Int): ParsedRegex
Parse a regular expression from a string, with the given flags.
Parse a regular expression from a string, with the given flags.
In general, this method is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create).- flags
match flags, a bit mask that may include
java.util.regex.Pattern.LITERAL
, andjava.util.regex.Pattern.COMMENTS
.
- def parse(regex: String): ParsedRegex
Parse a regular expression from a string.
Parse a regular expression from a string.
In general, this method is not necessary; a call to one of the
compile
methods is simpler and more direct. However, there are cases in which the intermediate ParsedRegexs are needed. Most notably, when caching CompiledRegex instances (which are in general more expensive to create). - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
Dregex is a Scala/JVM library that implements a regular expression engine using deterministic finite automata (DFA). The range of features supported is an middle ground between Perl-style (slow) engines and DFA-based ones. Yet it retains the linear matching time offered by the latter.