Package org.apache.oro.text.regex

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


        return result;
    }

    private static DdlResult parse(String queryString, String schmeaName, String pattern) {
        Perl5Matcher matcher = new Perl5Matcher();
        if (matcher.matches(queryString, PatternUtils.getPattern(pattern))) {
            Perl5Matcher tableMatcher = new Perl5Matcher();
            String matchString = matcher.getMatch().group(1) + " ";
            if (tableMatcher.matches(matchString, PatternUtils.getPattern(TABLE_PATTERN))) {
                String schmeaString = tableMatcher.getMatch().group(3);
                String tableString = tableMatcher.getMatch().group(4);
View Full Code Here


    private static DdlResult parse(String queryString, String schmeaName, String pattern) {
        Perl5Matcher matcher = new Perl5Matcher();
        if (matcher.matches(queryString, PatternUtils.getPattern(pattern))) {
            Perl5Matcher tableMatcher = new Perl5Matcher();
            String matchString = matcher.getMatch().group(1) + " ";
            if (tableMatcher.matches(matchString, PatternUtils.getPattern(TABLE_PATTERN))) {
                String schmeaString = tableMatcher.getMatch().group(3);
                String tableString = tableMatcher.getMatch().group(4);
                if (StringUtils.isNotEmpty(schmeaString)) {
                    // 特殊处理引号`
                    schmeaString = StringUtils.removeEnd(schmeaString, ".");
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

                                setParentSampleSuccess(res, false);
                                continue;
                            }
                        }
                        // I don't think localMatcher can be null here, but check just in case
                        if (pattern != null && localMatcher != null && !localMatcher.matches(urlStrEnc, pattern)) {
                            continue; // we have a pattern and the URL does not match, so skip it
                        }
                       
                        if (isConcurrentDwn()) {
                            // if concurrent download emb. resources, add to a list for async gets later
View Full Code Here

                } else if (equals) {
                    found = toCheck.equals(stringPattern);
                } else if (substring) {
                    found = toCheck.indexOf(stringPattern) != -1;
                } else {
                    found = localMatcher.matches(toCheck, pattern);
                }
                pass = notTest ? !found : found;
                if (!pass) {
                    if (debugEnabled){log.debug("Failed: "+stringPattern);}
                    result.setFailure(true);
View Full Code Here

            }
        }

        final String path = config.getPath();
        if (!newLink.getPath().equals(path)
                && !matcher.matches(newLink.getPath(), patternCache.getPattern("[/]*" + path, // $NON-NLS-1$
                        Perl5Compiler.READ_ONLY_MASK))) {
            return false;
        }

        PropertyIterator iter = arguments.iterator();
View Full Code Here

                                res.setSuccessful(false);
                                continue;
                            }
                        }
                        // I don't think localMatcher can be null here, but check just in case
                        if (pattern != null && localMatcher != null && !localMatcher.matches(urlStrEnc, pattern)) {
                            continue; // we have a pattern and the URL does not match, so skip it
                        }
                        HTTPSampleResult binRes = sample(url, GET, false, frameDepth + 1);
                        res.addSubResult(binRes);
                        res.setSuccessful(res.isSuccessful() && binRes.isSuccessful());
View Full Code Here

            // where the non-word char (\2) is the same
            // e.g.  abc|def|ghi but not abd|def~ghi
                    .getPattern("\\w+((\\W)\\w+)?(\\2\\w+)*(\\2\"\\w+\")*", // $NON-NLS-1$
                            // last entries may be quoted strings
                    Perl5Compiler.READ_ONLY_MASK);
            if (matcher.matches(input, pattern)) {
                delim = matcher.getMatch().group(2);
                parts = splitHeader(headerLine,delim);// now validate the result
            }
        }

View Full Code Here

  
    private String getSentRequestHeaderValue(String requestHeaders, String headerName) {
        Perl5Matcher localMatcher = JMeterUtils.getMatcher();
        String expression = ".*" + headerName + ": (\\d*).*";
        Pattern pattern = JMeterUtils.getPattern(expression, Perl5Compiler.READ_ONLY_MASK | Perl5Compiler.CASE_INSENSITIVE_MASK | Perl5Compiler.SINGLELINE_MASK);
        if(localMatcher.matches(requestHeaders, pattern)) {
            // The value is in the first group, group 0 is the whole match
            return localMatcher.getMatch().group(1);
        }
        return null;
    }
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.