Package org.apache.oro.text.regex

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


      //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;
        }
        if (url.startsWith("www.")) {
            url = "http://" + url;
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}, Constants.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

      //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;
        }
        if (url.startsWith("www.")) {
            url = "http://" + url;
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

                            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

    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}, Constants.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

        return hasFailMessage() ? getFailMessage() : new ValidationError(new I18nMessage("validation.string.regexp", new String[] {regexp}, Constants.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

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.