Packages

object Groups

An extractor object that yields the groups in the match. Using this extractor rather than the original Regex ensures that the match is not recomputed.

import scala.util.matching.Regex.Groups

val date = """(\d\d\d\d)-(\d\d)-(\d\d)""".r
val text = "The doc spree happened on 2011-07-15."
val day = date replaceAllIn(text, _ match { case Groups(_, month, day) => s"$month/$day" })
Source
Regex.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Groups
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. def unapplySeq(m: Match): Option[Seq[String]]