public static String unescape( String jcrExpression ) {
        Objects.requireNonNull(jcrExpression);
        if (jcrExpression.indexOf('\\') < 0) {
            return jcrExpression;
        }
        final StringBuilder buf = new StringBuilder(jcrExpression.length());

        for (CharacterIterator iter = new StringCharacterIterator(jcrExpression); iter.current() != CharacterIterator.DONE; iter.next()) {
            if (iter.current() == '\\' && iter.next() == '\\') {
                buf.append('\\');
                continue;
            }
            buf.append(iter.current());
        }
        return buf.toString();
    }
public static String unescape ( String jcrExpression ) { Objects . requireNonNull ( jcrExpression ) ; if ( jcrExpression . indexOf ( '\\' ) < 0 ) { return jcrExpression ; } final StringBuilder buf = new StringBuilder ( jcrExpression . length ( ) ) ; for ( CharacterIterator iter = new StringCharacterIterator ( jcrExpression ) ; iter . current ( ) != CharacterIterator . DONE ; iter . next ( ) ) { if ( iter . current ( ) == '\\' && iter . next ( ) == '\\' ) { buf . append ( '\\' ) ; continue ; } buf . append ( iter . current ( ) ) ; } return buf . toString ( ) ; }
Removes {@code \}-triggered escape sequences from {@code jcrExpression}.
@param jcrExpression {@link String}, never {@code null}
@return {@link String}
@since 5.5