DartRegexEngine class final

The default engine. It translates Oniguruma to ECMAScript and runs Dart's built-in RegExp, which is the browser's native engine on the web.

Implemented types

Constructors

DartRegexEngine({UnsupportedPatternCallback? onUnsupportedPattern, bool combinePatterns = true, int combineMaxSource = 2000})
An engine that reports patterns it can't run to onUnsupportedPattern.

Properties

combineMaxSource → int
Scanners whose patterns add up to more Oniguruma source than this search pattern by pattern, even with combinePatterns.
final
combinePatterns → bool
Search all of a scanner's patterns with one alternation regex instead of one regex each. Leftmost-first alternation gives the same winner as the per-pattern search, with far fewer regex calls. Dart 3.9 native runtimes use equivalent individual scans to avoid a RegExp JIT crash.
final
hashCode → int
The hash code for this object.
no setterinherited
onUnsupportedPattern → UnsupportedPatternCallback?
Called once for each pattern that can't be translated, with an UnsupportedPatternException.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createScanner(List<String> patterns) → Scanner
Compiles patterns into a scanner that returns the leftmost match across all of them.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited