Pattern class
Represents a regex pattern with fluent chainable methods.
Pattern objects are immutable - all modifier methods return new Pattern instances. Patterns can be combined using static methods like Simply.merge(), and compiled to IR using toIR().
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asCapture(
) → Pattern - Wraps this pattern in a capturing group
-
asGroup(
String name) → Pattern - Wraps this pattern in a named capturing group
-
lazy(
) → Pattern - Makes this pattern lazy (non-greedy)
-
may(
) → Pattern - Makes this pattern optional (matches 0 or 1 times)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
optional(
) → Pattern - Alias for may()
-
possessive(
) → Pattern - Makes this pattern possessive
-
repeat(
int min, [int? max]) → Pattern - Makes this pattern repeat between min and max times.
-
toIR(
) → Map< String, dynamic> - Returns the IR representation of this pattern
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited