fork download
  1. import java.io.{BufferedReader, InputStreamReader}
  2.  
  3.  
  4.  
  5. object Main {
  6.  
  7. val exp = "(.)(.)".r
  8. def main(args: Array[String]) {
  9.  
  10. }
  11. def e (s: String) = s match {
  12. case m @ exp.matches(s) => Some(m)
  13. case _ => None
  14. }
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
Main.scala:12: error: value matches is not a member of scala.util.matching.Regex
    case m @ exp.matches(s) => Some(m)
                 ^
one error found
spoj: The program compiled successfully, but Main.class was not found.
      Class Main should contain method: def main(args: Array[String]).
stdout
Standard output is empty