regex.scala
val target = "abc"
val passwordRegex = """[a-zA-Z0-9]+""".r;
isValidated:Boolean = target match {
case passwordRegex() => true
case _ => false
}
)
passwordRegexのあとに( )がないと、この場合ではなんでもtrueになってしまう。
Go to list of users who liked
More than 5 years have passed since last update.
val target = "abc"
val passwordRegex = """[a-zA-Z0-9]+""".r;
isValidated:Boolean = target match {
case passwordRegex() => true
case _ => false
}
)
passwordRegexのあとに( )がないと、この場合ではなんでもtrueになってしまう。
Register as a new user and use Qiita more conveniently
Go to list of users who liked