fork(3) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.util.regex.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Pattern withCE = Pattern.compile("^a\u030A\\sx$",Pattern.CANON_EQ);
  10. Pattern withoutCE = Pattern.compile("^a\u030A\\sx$");
  11. String inputWithCE = "\u00E5 x";
  12. String inputWithoutCE = "a\u030A x";
  13.  
  14. System.out.println("Matches with canon eq: " + withCE.matcher(inputWithCE).matches());
  15. System.out.println("Matches without canon eq: " + withoutCE.matcher(inputWithoutCE).matches());
  16. }
  17. }
Success #stdin #stdout 0.07s 2184192KB
stdin
Standard input is empty
stdout
Matches with canon eq: false
Matches without canon eq: true