Scala Language Tutorial:

Scala Language Regular Expressions

Syntax

  • re.findAllIn(s: CharSequence): MatchIterator
  • re.findAllMatchIn(s: CharSequence): Iterator[Match]
  • re.findFirstIn(s: CharSequence): Option[String]
  • re.findFirstMatchIn(s: CharSequence): Option[Match]
  • re.findPrefixMatchIn(s: CharSequence): Option[Match]
  • re.findPrefixOf(s: CharSequence): Option[String]
  • re.replaceAllIn(s: CharSequence, replacer: Match => String): String
  • re.replaceAllIn(s: CharSequence, replacement: String): String
  • re.replaceFirstIn(s: CharSequence, replacement: String): String
  • re.replaceSomeIn(s: CharSequence, replacer: Match => Option[String]): String
  • re.split(s: CharSequence): Array[String]

Scala Language Regular Expressions Examples:

Related Scala Language Tutorial Topics:

Other Tutorial Topics:

This modified content is an extract of the original Stack Overflow Documentation released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow. This topic was created and modified by the Stack Ovedrflow Contributor.