Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.util/scala.util.matching/Regex/Groups

Groups

scala.util.matching.Regex.Groups
objectGroups

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

import scala.util.matching.Regex.Groupsval date = """(\d\d\d\d)-(\d\d)-(\d\d)""".rval text = "The doc spree happened on 2011-07-15."val day = date replaceAllIn(text, _ match { case Groups(_, month, day) => s"$month/$day" })

Attributes

Source
Regex.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
Groups.type

Members list

Value members

Concrete methods

Attributes

Source
Regex.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp