An object providing factory methods for creating instances of RegexGroups, which represent a combination of a regular expression and a list of group indexes.
It includes methods to construct RegexGroups with a regex pattern as a Regex instance or as a string, along with an optional list of group indexes. If no group indexes are provided, all groups are selected by default.
Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
RegexGroups.type
Members list
Type members
Inherited and Abstract types
The names of the product elements.
The names of the product elements.
Attributes
- Inherited from:
- Mirror
The name of the type.
The name of the type.
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Constructs a RegexGroups instance using the provided regular expression and no specific group indexes. If no group indexes are specified, all groups are selected by default.
Constructs a RegexGroups instance using the provided regular expression and no specific group indexes. If no group indexes are specified, all groups are selected by default.
Value parameters
- regex
-
the regular expression to be used for matching.
Attributes
- Returns
-
a
RegexGroupsinstance combining the provided regular expression and default group indexes.
Constructs a RegexGroups instance using the provided regular expression string and no specific group indexes. If no group indexes are specified, all groups are selected by default.
Constructs a RegexGroups instance using the provided regular expression string and no specific group indexes. If no group indexes are specified, all groups are selected by default.
Value parameters
- regex
-
the regular expression string to be used for matching.
Attributes
- Returns
-
a
RegexGroupsinstance combining the provided regular expression and default group indexes.
Creates a RegexGroups instance by combining the provided regular expression with the specified group indexes.
Creates a RegexGroups instance by combining the provided regular expression with the specified group indexes.
Value parameters
- groups
-
the group indexes to be extracted from the regular expression. If no indexes are provided, all groups will be selected.
- regex
-
the regular expression to be used for matching.
Attributes
- Returns
-
a
RegexGroupsinstance containing the regular expression and the list of specified group indexes.
Creates an instance of RegexGroups by combining a regular expression pattern, supplied as a string, with a sequence of group indexes.
Creates an instance of RegexGroups by combining a regular expression pattern, supplied as a string, with a sequence of group indexes.
Value parameters
- groups
-
a variable-length sequence of integers specifying the group indexes to include. If not specified, all groups will be included by default.
- regex
-
the regular expression pattern as a string.
Attributes
- Returns
-
a
RegexGroupsinstance that combines the given regex pattern and the specified group indexes.