CaptureGroup class

Capture a single, or a series of expressions and group them up as a single expression.

This allows a method of treating the expression like a reusable variable, by allowing a back-referencing, either by index or by name.

Example:

CaptureGroup(
  AlternationGroup(
    [
      RawExpression("gmail\\.com",),
      RawExpression("yahoo\\.com",),
    ],
  ),
);
// results in (gmail\.com|yahoo\.com)
Implemented types
Available Extensions

Constructors

CaptureGroup(RegExpComponent expression, {String? name, bool nonCapturing = false})
Constructs a new expression that captures another expression and wrap it under an enclosed rounded bracket context.
const

Properties

expression RegExpComponent
final
hashCode int
The hash code for this object.
no setterinherited
name String?
An optional name to be used for name based back-referencing
final
nonCapturing bool
If true, disables back-referencing for this group
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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