RegexGroups

com.phasmidsoftware.matchers.RegexGroups
See theRegexGroups companion class
object RegexGroups

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 Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def apply(regex: Regex): RegexGroups

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 RegexGroups instance combining the provided regular expression and default group indexes.

def apply(regex: String): RegexGroups

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 RegexGroups instance combining the provided regular expression and default group indexes.

def create(regex: Regex, groups: Int*): RegexGroups

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 RegexGroups instance containing the regular expression and the list of specified group indexes.

def create(regex: String, groups: Int*): RegexGroups

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 RegexGroups instance that combines the given regex pattern and the specified group indexes.