fork(14) download
  1. import java.util.*
  2.  
  3. fun main(args: Array<String>) {
  4. val text = "We are testing!"
  5. val regex = """(?i)\b(i|you|we)\b""".toRegex()
  6. if (regex.containsMatchIn(text)) {
  7. println("match")
  8. } else {
  9. println("no match")
  10. }
  11. }
Success #stdin #stdout 0.09s 37396KB
stdin
Standard input is empty
stdout
match