public static boolean safe(String pattern) {for (int i = 0; i < pattern.length(); i++) {final char c = pattern.charAt(i);switch (c) {case '.':case '?':case '*':case '+':case '{':case '}':case '(':case ')':case '[':case ']':case '\\':return false;}}return true;}

public static boolean safe ( String pattern ) { for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { final char c = pattern . charAt ( i ) ; switch ( c ) { case '.' : case '?' : case '*' : case '+' : case '{' : case '}' : case '(' : case ')' : case '[' : case ']' : case '\\' : return false ; } } return true ; }
public static bool Safe(string pattern){for (int i = 0; i < pattern.Length; i++){char c = pattern[i];switch (c){case '.':case '?':case '*':case '+':case '{':case '}':case '(':case ')':case '[':case ']':case '\\':{return false;}}}return true;}
