fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. class Ideone
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String compare = "(?i)T[yi]re";
  9. String detail = "Tyre";
  10. String detail2 = "Tire";
  11. System.out.println(detail.matches(compare)); // prints "true"
  12. System.out.println(detail2.matches(compare)); // also "true"
  13. }
  14. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
true
true