question: 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 ) ; }
target:  Translates a SQL SIMILAR pattern to Java regex pattern, with optional escape string.