Scala-pattern与正则

2017-07-18  本文已影响0人  Zachary4biz

参见SO的问题

val Pattern = "([a-cA-C])".r
word.firstLetter match {
   case Pattern(c) => c bound to capture group here
   case _ =>
}
上一篇 下一篇

猜你喜欢

热点阅读