src/java/org/pifan/util/StringUtils.java
/**
     * Extracts everything inside of the beginning and ending delimiter.
     * 
     * @param fullStr
     * @param beginDelim
     * @param endDelim
     * @return
     */
Extracts everything inside of the beginning and ending delimiter.


Extracts everything inside of the beginning and ending delimiter .
public static final String extractInside(String fullStr, String beginDelim, String endDelim) {
        if (fullStr == null || fullStr.trim().length() == 0) {
            return fullStr;
        }
        int beginIndex = fullStr.lastIndexOf(beginDelim);
        int endIndex = fullStr.lastIndexOf(endDelim);
        if (beginIndex == -1 && endIndex == -1) {
            return fullStr;
        }
        return fullStr.substring(beginIndex + 1, endIndex);
    }
public static final String extractInside ( String fullStr , String beginDelim , String endDelim ) { if ( fullStr == null || fullStr . trim ( ) . length ( ) == 0 ) { return fullStr ; } int beginIndex = fullStr . lastIndexOf ( beginDelim ) ; int endIndex = fullStr . lastIndexOf ( endDelim ) ; if ( beginIndex == - 1 && endIndex == - 1 ) { return fullStr ; } return fullStr . substring ( beginIndex + 1 , endIndex ) ; }
Extracts everything inside of the beginning and ending delimiter.
Extracts everything inside of the beginning and ending delimiter .