Scala Library
|
|
scala/util/matching/Regex.scala
]
class
Regex(regex : java.lang.String, groupNames : java.lang.String*)
extends
AnyRefregex -
A string representing a regular expressiongroupNames -
A mapping from names to indices in capture groupsValue Summary | |
val
|
pattern
: java.util.regex.Pattern
The compiled pattern
|
Method Summary | |
def
|
findAllIn
(source : java.lang.CharSequence) : MatchIterator
Return all matches of this regexp in given character sequence as an iterator
|
def
|
findFirstIn
(source : java.lang.CharSequence) : Option[java.lang.String]
Return optionally first matching string of this regexp in given character sequence,
None if it does not exist.
|
def
|
findFirstMatchIn
(source : java.lang.CharSequence) : Option[Match]
Return optionally first match of this regexp in given character sequence,
None if it does not exist.
|
def
|
findPrefixMatchOf
(source : java.lang.CharSequence) : Option[Match]
Return optionally match of this regexp at the beginning of the
given character sequence, or None if regexp matches no prefix
of the character sequence.
|
def
|
findPrefixOf
(source : java.lang.CharSequence) : Option[java.lang.String]
Return optionally match of this regexp at the beginning of the
given character sequence, or None if regexp matches no prefix
of the character sequence.
|
def
|
replaceAllIn
(target : java.lang.CharSequence, replacement : java.lang.String) : java.lang.String
Replaces all matches by a string.
|
def
|
replaceFirstIn
(target : java.lang.CharSequence, replacement : java.lang.String) : java.lang.String
Replaces the first match by a string.
|
override def
|
toString
: java.lang.String
The string defining the regular expression
|
def
|
unapplySeq
(target : Any) : Option[List[java.lang.String]]
Tries to match target (whole match) and returns
the matches.
|
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Value Details |
Method Details |
def
unapplySeq(target : Any) : Option[List[java.lang.String]]
target -
The string to match
def
findAllIn(source : java.lang.CharSequence) : MatchIterator
def
findFirstIn(source : java.lang.CharSequence) : Option[java.lang.String]
def
findFirstMatchIn(source : java.lang.CharSequence) : Option[Match]
def
findPrefixOf(source : java.lang.CharSequence) : Option[java.lang.String]
def
findPrefixMatchOf(source : java.lang.CharSequence) : Option[Match]
def
replaceAllIn(target : java.lang.CharSequence, replacement : java.lang.String) : java.lang.String
target -
The string to matchreplacement -
The string that will replace each match
def
replaceFirstIn(target : java.lang.CharSequence, replacement : java.lang.String) : java.lang.String
target -
The string to matchreplacement -
The string that will replace the matchoverride
def
toString : java.lang.String
Scala Library
|
|