val Pattern = "([a-cA-C])".r
word.firstLetter match {
case Pattern(c) => c bound to capture group here
case _ =>
}
val Pattern = "([a-cA-C])".r
word.firstLetter match {
case Pattern(c) => c bound to capture group here
case _ =>
}
本文标题:Scala-pattern与正则
本文链接:https://www.haomeiwen.com/subject/nmtkkxtx.html
网友评论