RegexGroups

com.phasmidsoftware.matchers.RegexGroups
See theRegexGroups companion object
case class RegexGroups(regex: Regex, groups: Seq[Int])

A class combining a regular expression and a list of group indexes. NOTE: there are no unit tests for this class.

Value parameters

groups

a list of required group indexes (if Nil, then all groups are selected). NOTE that the group indexes start at 1.

regex

a Regex.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def unapplySeq(s: CharSequence): Option[List[String]]

Attempts to match a given CharSequence against the regular expression and extract the selected groups if the match is successful.

Attempts to match a given CharSequence against the regular expression and extract the selected groups if the match is successful.

Value parameters

s

the input CharSequence to be matched against the regular expression.

Attributes

Returns

an Option containing a List of the selected group strings if the match is successful, or None if no match is found.

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product