private static boolean isMatchWildcardPattern(final String segment, final String pattern) {
        int sRight = segment.length();
        int pRight = pattern.length();
        while (sRight > 0 && pRight > 0 && pattern.charAt(pRight - 1) != '*') {
            if (segment.charAt(sRight - 1) == pattern.charAt(pRight - 1)) {
                --sRight;
                --pRight;
            } else {
                return false;
            }
        }

        if (pRight == 0) {
            return sRight == 0;
        }

        int sIndex = 0;
        int pIndex = 0;
        int sRecord = -1;
        int pRecord = -1;

        while (sIndex < sRight && pIndex < pRight) {
            if (pattern.charAt(pIndex) == '*') {
                ++pIndex;
                sRecord = sIndex;
                pRecord = pIndex;
            } else if (segment.charAt(sIndex) == pattern.charAt(pIndex)) {
                ++sIndex;
                ++pIndex;
            } else if (sRecord != -1 && sRecord + 1 < sRight) {
                ++sRecord;
                sIndex = sRecord;
                pIndex = pRecord;
            } else {
                return false;
            }
        }

        return allStars(pattern, pIndex, pRight);
    }
remove rule data.

@param currentNode current node
@param pathParts path parts
@param ruleData rule data
@param collection rule data list
shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/trie/ShenyuTrie.java