public Pattern toRegex() {
        String prefix = (this.pattern.startsWith("*") ? ".*" : "");
        String suffix = (this.pattern.endsWith("*") ? ".*" : "");
        String regex = Arrays.stream(this.pattern.split("\\*"))
                .filter(s -> !s.isEmpty())
                .map(Pattern::quote)
                .collect(Collectors.joining(".*", prefix, suffix));
        return Pattern.compile(regex);
    }
@Test
    public void testToRegex() {
        ResourcePatternDescriber describer = new ResourcePatternDescriber(
                "META-INF/dubbo/internal/org.apache.dubbo.common.extension.ExtensionInjector", null);
        Assertions.assertEquals(
                "\\QMETA-INF/dubbo/internal/org.apache.dubbo.common.extension.ExtensionInjector\\E",
                describer.toRegex().toString());
    }