Package jregex

Examples of jregex.Matcher.find()


                  continue;
                }
                 
                Pattern pat = child.getPattern();
                Matcher m = pat.matcher(txt);
                if(m.find()) {
                 
                    String tokText;
                    int pg = child.getParseGroup();
                    try {
                        tokText = m.group(pg);
View Full Code Here


                }
                String patternString = path;
                patternString = customRegexPattern.replacer("\\{<[^/]+>$1\\}").replace(patternString);
                Matcher matcher = argsPattern.matcher(patternString);
                while (matcher.find()) {
                    Arg arg = new Arg();
                    arg.name = matcher.group(2);
                    arg.constraint = new Pattern(matcher.group(1));
                    args.add(arg);
                }
View Full Code Here

                }
                String patternString = path;
                patternString = customRegexPattern.replacer("\\{<[^/]+>$1\\}").replace(patternString);
                Matcher matcher = argsPattern.matcher(patternString);
                while (matcher.find()) {
                    Arg arg = new Arg();
                    arg.name = matcher.group(2);
                    arg.constraint = new Pattern(matcher.group(1));
                    args.add(arg);
                }
View Full Code Here

                }
                String patternString = path;
                patternString = customRegexPattern.replacer("\\{<[^/]+>$1\\}").replace(patternString);
                Matcher matcher = argsPattern.matcher(patternString);
                while (matcher.find()) {
                    Arg arg = new Arg();
                    arg.name = matcher.group(2);
                    arg.constraint = new Pattern(matcher.group(1));
                    args.add(arg);
                }
View Full Code Here

                }
            }
            String patternString = path;
            patternString = customRegexPattern.replacer("\\{<[^/]+>$1\\}").replace(patternString);
            Matcher matcher = argsPattern.matcher(patternString);
            while (matcher.find()) {
                Arg arg = new Arg();
                arg.name = matcher.group(2);
                arg.constraint = new Pattern(matcher.group(1));
                args.add(arg);
            }
View Full Code Here

                }
                String patternString = path;
                patternString = customRegexPattern.replacer("\\{<[^/]+>$1\\}").replace(patternString);
                Matcher matcher = argsPattern.matcher(patternString);
                while (matcher.find()) {
                    Arg arg = new Arg();
                    arg.name = matcher.group(2);
                    arg.constraint = new Pattern(matcher.group(1));
                    args.add(arg);
                }
View Full Code Here

  }

  public String parseBrowserFamily(String userAgent) {
    for (Map.Entry<Pattern, Long> entry : compiledBrowserRegMap.entrySet()) {
      Matcher matcher = entry.getKey().matcher(userAgent);
      if (matcher.find()) {
        Long idBrowser = entry.getValue();
        BrowserEntry be = browserMap.get(idBrowser);
        if (be != null) {
          return be.getFamily();
        }
View Full Code Here

    protected void processOsRegex(String useragent, UserAgentInfo retObj) {
        Set<Entry<Matcher, Long>> osMatcherSet = getOsMatcherSet();
        for (Map.Entry<Matcher, Long> entry : osMatcherSet) {
            Matcher matcher = entry.getKey();
            matcher.setTarget(useragent);
            if (matcher.find()) {
                retObj.setOsEntry(osMap.get(entry.getValue()));
                break;
            }
        }
    }
View Full Code Here

    protected void processBrowserRegex(String useragent, UserAgentInfo retObj) {
        Set<Entry<Matcher, Long>> browserMatcherSet = getBrowserMatcherSet();
        for (Map.Entry<Matcher, Long> entry : browserMatcherSet) {
            Matcher matcher = entry.getKey();
            matcher.setTarget(useragent);
            if (matcher.find()) {
                Long idBrowser = entry.getValue();
                BrowserEntry be = browserMap.get(idBrowser);
                if (be != null) {
                    retObj.setType(browserTypeMap.get(be.getType()));;
                    if (matcher.groupCount() > 1) {
View Full Code Here

            return;
        }
        for (Map.Entry<Matcher, Long> entry : deviceMatcherSet) {
            Matcher matcher = entry.getKey();
            matcher.setTarget(useragent);
            if (matcher.find()) {
                uaInfo.setDeviceEntry(deviceMap.get(entry.getValue()));
                return;
            }
        }
    }
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.