public static int lastIndexOf(final String input, final char delim, final int fromIndex) {
        if (input == null) return -1;
        int index = input.lastIndexOf(delim, fromIndex);
        while (index != -1 && index != 0) {
            if (input.charAt(index - 1) != '\\') break;
            index = input.lastIndexOf(delim, index - 1);
        }
        return index;
    }
public static int lastIndexOf ( final String input , final char delim , final int fromIndex ) { if ( input == null ) return - 1 ; int index = input . lastIndexOf ( delim , fromIndex ) ; while ( index != - 1 && index != 0 ) { if ( input . charAt ( index - 1 ) != '\\' ) break ; index = input . lastIndexOf ( delim , index - 1 ) ; } return index ; }
Gets the last index of a character starting at fromIndex. Ignoring characters that have been escaped

@param input     The string to be searched
@param delim     The character to be found
@param fromIndex Start searching from this index
@return The index of the found character or -1 if the character wasn't found