static String sqlToRegexSimilar(String sqlPattern,CharSequence escapeStr){
  final char escapeChar;
  if (escapeStr != null) {
    if (escapeStr.length() != 1) {
      throw invalidEscapeCharacter(escapeStr.toString());
    }
    escapeChar=escapeStr.charAt(0);
  }
 else {
    escapeChar=0;
  }
  return sqlToRegexSimilar(sqlPattern,escapeChar);
}

static String sqlToRegexSimilar ( String sqlPattern , CharSequence escapeStr ) { final char escapeChar ; if ( escapeStr != null ) { if ( escapeStr . length ( ) != 1 ) { throw invalidEscapeCharacter ( escapeStr . toString ( ) ) ; } escapeChar = escapeStr . charAt ( 0 ) ; } else { escapeChar = 0 ; } return sqlToRegexSimilar ( sqlPattern , escapeChar ) ; }
translates a sql similar pattern to java regex pattern , with optional escape string .
