fork(5) 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$",Pattern.CANON_EQ);
  10. Pattern withoutCE = Pattern.compile("^a\u030A$");
  11. String input = "\u00E5";
  12.  
  13. System.out.println("Matches with canon eq: " + withCE.matcher(input).matches());
  14. System.out.println("Matches without canon eq: " + withoutCE.matcher(input).matches());
  15. }
  16. }
Success #stdin #stdout 0.06s 246144KB
stdin
Standard input is empty
stdout
Matches with canon eq: true
Matches without canon eq: false