Package org.apache.oro.text.regex

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


  if (pat == null || pat.length == 0)
      return null;
  String sub[] = getSubstitutions();
  String result = null;
  for (int i=0; i< pat.length; i++) {
      if (matcher.matches(requrl, pat[i])) {
    Substitution s = new Perl5Substitution(sub[i]);
    result = Util.substitute(matcher, pat[i], s, requrl,
           Util.SUBSTITUTE_ALL);
    break;
      }
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

            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 (pattern != null)
            {
                PatternMatcher matcher = new Perl5Matcher();
               
                if ((matcher.matches(path, pattern)) || (matcher.matches(path + "/", pattern)))
                {
                    servlet = (Servlet) this.servletInstanceMap.get(servletMappingInfo.getServletName());
                    break;
                }
            }
View Full Code Here

            if (pattern != null)
            {
                PatternMatcher matcher = new Perl5Matcher();
               
                if ((matcher.matches(path, pattern)) || (matcher.matches(path + "/", pattern)))
                {
                    servlet = (Servlet) this.servletInstanceMap.get(servletMappingInfo.getServletName());
                    break;
                }
            }
View Full Code Here

                        String name = (String) iter.next();
                        boolean use = false;

                        for( int n = 0; !use && n < refer.length; n++ )
                        {
                            use = matcher.matches( name, refer[n] );
                        }

                        if( use )
                        {
                            Collection<String> refs = engine.getReferenceManager().findReferrers( name );
View Full Code Here

                                use = false;

                                for( int n = 0; !use && n < include.length; n++ )
                                {

                                    use = matcher.matches( name, include[n] );
                                }
                            }

                            // did we specify what pages to exclude?
                            if( use && null != exclude )
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.