If you want to change selection, open document below and click on "Move attachment"
Scala Regular Expressions ions through Regex class available in the scala.util.matching package. Let us check an example where we will try to find out word Scala from a statement:
import scala.util.matching.Regex
object Test {
def main(args: Array[String]) {
<span>val pattern = "Scala".r
val str = "Scala is Scalable and cool"
println(pattern findFirstIn str)
}
}
When the above code is compiled and executed, it produces the following result:
C:/
Summary
status
not read
reprioritisations
last reprioritisation on
suggested re-reading day
started reading on
finished reading on
Details
Discussion
Do you want to join discussion? Click here to log in or create user.