@SuppressWarnings("purity") private static boolean isRegex(String s){
  try {
    Pattern.compile(s);
  }
 catch (  PatternSyntaxException e) {
    return false;
  }
  return true;
}

@ SuppressWarnings ( "purity" ) private static boolean isRegex ( String s ) { try { Pattern . compile ( s ) ; } catch ( PatternSyntaxException e ) { return false ; } return true ; }
this method is a copy of regexutil . isregex . we cannot directly use regexutil , because it uses type annotations which cannot be used in ides ( yet ) .
