Package org.apache.oro.text.regex

Examples of org.apache.oro.text.regex.PatternMatcher.matches()


            if (value == null) {
                continue;
            }

            // ����antx.properties.*����Ϊ����������
            if (matcher.matches(key, ANTX_PROPERTIES_PATTERN) || "antx.properties".equals(key)) {
                continue;
            }

            String defaultValue = null;

View Full Code Here


        for (Iterator i = getMergedKeys().iterator(); i.hasNext();) {
            String key = (String) i.next();
            PatternMatcher matcher = new Perl5Matcher();

            // ����antx.properties.*����Ϊ����������
            if (matcher.matches(key, ANTX_PROPERTIES_PATTERN) || "antx.properties".equals(key)) {
                continue;
            }

            // ��shared properties����key
            PropertiesFile[] files = getSharedPropertiesFilesExpanded();
View Full Code Here

        for (Iterator i = props.keySet().iterator(); i.hasNext();) {
            String key = (String) i.next();
            PatternMatcher matcher = new Perl5Matcher();

            if (matcher.matches(key, ANTX_PROPERTIES_PATTERN)) {
                MatchResult result = matcher.getMatch();
                String name = result.group(1);
                int index;

                try {
View Full Code Here

        if (getMode().endsWith("contain")) {
            boolean match = matcher.contains(value, pattern);

            return not ? !match : match;
        } else if (getMode().endsWith("exact")) {
            boolean match = matcher.matches(value, pattern);

            return not ? !match : match;
        } else if (getMode().endsWith("prefix")) {
            boolean match = matcher.matchesPrefix(value, pattern);
View Full Code Here

            componentNamePattern = new PathNameCompiler().compile("META-INF/**/autoconf/auto-config.xml");
        } catch (MalformedPatternException e) {
            throw new ConfigException(e);
        }

        if (matcher.matches(name.replace('\\', '/'), componentNamePattern)) {
            componentName = matcher.getMatch().group(1);
        }

        context.put("component", componentName);
    }
View Full Code Here

    /**
     * 解析DataMedia中的namespace和name,支持offer[1-128]分库的定义
     */
    public static ModeValue parseMode(String value) {
        PatternMatcher matcher = new Perl5Matcher();
        if (matcher.matches(value, patterns.get(MODE_PATTERN))) {
            MatchResult matchResult = matcher.getMatch();
            String prefix = matchResult.group(1);
            String startStr = matchResult.group(3);
            String ednStr = matchResult.group(4);
            int start = Integer.valueOf(startStr);
View Full Code Here

                '^', '.' });
    }

    private static boolean isWildCardMatch(String matchPattern, String value) {
        PatternMatcher matcher = new Perl5Matcher();
        return matcher.matches(value, patterns.get(matchPattern));
    }

    public static int indexIgnoreCase(List<String> datas, String value) {
        for (int i = 0; i < datas.size(); i++) {
            String data = datas.get(i);
View Full Code Here

    /**
     * 解析DataMedia中的namespace和name,支持offer[1-128]分库的定义
     */
    public static ModeValue parseMode(String value) {
        PatternMatcher matcher = new Perl5Matcher();
        if (matcher.matches(value, patterns.get(MODE_PATTERN))) {
            MatchResult matchResult = matcher.getMatch();
            String prefix = matchResult.group(1);
            String startStr = matchResult.group(3);
            String ednStr = matchResult.group(4);
            int start = Integer.valueOf(startStr);
View Full Code Here

        return StringUtils.containsAny(value, new char[] { '*', '?', '+', '{', '}', '[', ']', '\\', '$', '^', '.' });
    }

    private static boolean isWildCardMatch(String matchPattern, String value) {
        PatternMatcher matcher = new Perl5Matcher();
        return matcher.matches(value, patterns.get(matchPattern));
    }

    public static int indexIgnoreCase(List<String> datas, String value) {
        for (int i = 0; i < datas.size(); i++) {
            String data = datas.get(i);
View Full Code Here

        if (getMode().endsWith("contain")) {
            boolean match = matcher.contains(value, pattern);

            return not ? !match : match;
        } else if (getMode().endsWith("exact")) {
            boolean match = matcher.matches(value, pattern);

            return not ? !match : match;
        } else if (getMode().endsWith("prefix")) {
            boolean match = matcher.matchesPrefix(value, pattern);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.