mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[CHANGE] Comment match on serial key now mentions verbatim (multiline)
This commit is contained in:
parent
3cb8d2bcc5
commit
07b6229ee6
@ -322,7 +322,7 @@ kate match { case Person("Kate", _) => "Girl"; case Person("George", _) => "Boy"
|
||||
|
||||
// Regular expressions
|
||||
val email = "(.*)@(.*)".r // Invoking r on String makes it a Regex
|
||||
val serialKey = """(\d{5})-(\d{5})-(\d{5})-(\d{5})""".r // Using multiline string syntax
|
||||
val serialKey = """(\d{5})-(\d{5})-(\d{5})-(\d{5})""".r // Using verbatim (multiline) syntax
|
||||
|
||||
val matcher = (value: String) => {
|
||||
println(value match {
|
||||
|
Loading…
Reference in New Issue
Block a user