match { case Some(user) if user.isAdmin => “administrator” case Some(user) => “normal user” // case _ => “guest user” warning! } val r = “""(\d{4})-‐(\d{2})-‐(\d{2})""".r “2015-‐02-‐22” match { case r(year, month, day) => something(year, month, day) case _ => throw new Exception(“format exception”) } if Ψʔυઅ͕͋Δ ߹ବ