code: public Pattern getRegExpFromLikeExpression(String likeExpression) {
  		StringBuilder pattern = new StringBuilder( "^" );
  
  		State state = State.INITIAL;
  		for ( int i = 0; i < likeExpression.length(); i++ ) {
  			char character = likeExpression.charAt( i );
  			state = state.handleCharacter( character, escapeCharacter, pattern );
  		}
  
  		if ( state == State.PATTERN ) {
  			pattern.append( "\\E" );
  		}
  
  		pattern.append( "$" );
  
  		return Pattern.compile( pattern.toString(), Pattern.DOTALL );
  	}
docs: Creates a regular expression pattern object equivalent to the given {@code LIKE} expression.
  
  @param likeExpression the HQL/JPQL {@code LIKE} expression to convert
  @return a regular expression pattern object equivalent to the given {@code LIKE} expression