public static String simplePatternToFullRegularExpression(String pattern){
  StringBuffer buf=new StringBuffer();
  for (int i=0; i < pattern.length(); i++) {
    char c=pattern.charAt(i);
switch (c) {
case '*':
      buf.append(".*");
    break;
case '.':
case '[':
case ']':
case '\\':
case '+':
case '?':
case '{':
case '}':
case '$':
case '^':
case '|':
case '(':
case ')':
  buf.append('\\');
default :
buf.append(c);
break;
}
}
return buf.toString();
}

public static String simplePatternToFullRegularExpression ( String pattern ) { StringBuffer buf = new StringBuffer ( ) ; for ( int i = 0 ; i < pattern . length ( ) ; i ++ ) { char c = pattern . charAt ( i ) ; switch ( c ) { case '*' : buf . append ( ".*" ) ; break ; case '.' : case '[' : case ']' : case '\\' : case '+' : case '?' : case '{' : case '}' : case '$' : case '^' : case '|' : case '(' : case ')' : buf . append ( '\\' ) ; default : buf . append ( c ) ; break ; } } return buf . toString ( ) ; }
converts a ' simplified ' regular expression to a full regular expression
