Package org.apache.oro.text.regex

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


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

                                    use &= !matcher.matches( name, exclude[n] );
                                }
                            }

                            if( use )
                            {
View Full Code Here


      //loop the matches
      while (matcher.contains(input, pattern)) {
        result = matcher.getMatch();
        url = result.group(2);
        PatternMatcherInput input1 = new PatternMatcherInput(url);
        if (!matcher1.matches(input1, pattern1)) {
          if (LOG.isTraceEnabled()) {
          LOG.trace(" - invalid '" + url + "'");
          }
          continue;
        }
View Full Code Here

    private void setFieldsValues(String value) {
        if (value == null) {
            resetFieldsValues();
        } else {
            PatternMatcher matcher = new Perl5Matcher();
            if (matcher.matches(value, getAggregateFieldDefinition().getSplitPattern())) {
                MatchResult matchResult = matcher.getMatch();
                Iterator iterator = getAggregateFieldDefinition().getSplitMappingsIterator();
                while (iterator.hasNext()) {
                    SplitMapping splitMapping = (SplitMapping)iterator.next();
                    String result = matchResult.group(splitMapping.getGroup());
View Full Code Here

        return hasFailMessage() ? getFailMessage() : new ValidationError(new I18nMessage("validation.string.regexp", new String[] {regexp}, FormsConstants.I18N_CATALOGUE));
    }
   
    private boolean matchesRegExp(String string) {
        PatternMatcher matcher = new Perl5Matcher();
        return matcher.matches(string, pattern);
    }
   
    void setPattern(String regexp, Pattern pattern) {
        this.regexp = regexp;
      this.pattern = pattern;
View Full Code Here

            validationError = null;
   
            if (enteredValue != null) {
                // try to split it
                PatternMatcher matcher = new Perl5Matcher();
                if (matcher.matches(enteredValue, definition.getSplitPattern())) {
                    MatchResult matchResult = matcher.getMatch();
                    Iterator iterator = definition.getSplitMappingsIterator();
                    while (iterator.hasNext()) {
                        SplitMapping splitMapping = (SplitMapping)iterator.next();
                        String result = matchResult.group(splitMapping.getGroup());
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

    /**
     * 解析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

      //loop the matches
      while (matcher.contains(input, pattern)) {
        result = matcher.getMatch();
        url = result.group(2);
        PatternMatcherInput input1 = new PatternMatcherInput(url);
        if (!matcher1.matches(input1, pattern1)) {
          if (LOG.isTraceEnabled()) {
          LOG.trace(" - invalid '" + url + "'");
          }
          continue;
        }
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.