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</code> input String returns <code>null</code>. A <code>null</code>
open/close returns <code>null</code> (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</code> if no match
@since 2.0
spring-cloud-alibaba-starters/spring-cloud-alibaba-commons/src/main/java/com/alibaba/cloud/commons/lang/StringUtils.java