public static String substringBetween(String str, String open, String close) {
        if (str == null || open == null || close == null) {
            return null;
        }
        int start = str.indexOf(open);
        if (start != INDEX_NOT_FOUND) {
            int end = str.indexOf(close, start + open.length());
            if (end != INDEX_NOT_FOUND) {
                return str.substring(start + open.length(), end);
            }
        }
        return null;
    }
<p>Gets the String that is nested in between two Strings.
Only the first match is returned.</p>

<p>A {@code null} input String returns {@code null}.
A {@code null} open/close returns {@code null} (no match).
An empty ("") open and close returns an empty string.</p>

<pre>
StringUtils.substringBetween("wx[b]yz", "[", "]") = "b"
StringUtils.substringBetween(null, *, *)          = null
StringUtils.substringBetween(*, null, *)          = null
StringUtils.substringBetween(*, *, null)          = null
StringUtils.substringBetween("", "", "")          = ""
StringUtils.substringBetween("", "", "]")         = null
StringUtils.substringBetween("", "[", "]")        = null
StringUtils.substringBetween("yabcz", "", "")     = ""
StringUtils.substringBetween("yabcz", "y", "z")   = "abc"
StringUtils.substringBetween("yabczyabcz", "y", "z")   = "abc"
</pre>

@param str  the String containing the substring, may be null
@param open  the String before the substring, may be null
@param close  the String after the substring, may be null
@return the substring, {@code null} if no match
@since 2.0
android/android_framework/base/src/main/java/lang3/StringUtils.java