Examples of lookingAt()


Examples of java.util.regex.Matcher.lookingAt()

            }
        } else if (hasPackageStats) {
            boolean matchAny = false;
            for (String packageName : packageStatsMap.keySet()) {
                Matcher m = classPattern.matcher(packageName);
                if (m.lookingAt()) {
                    matchAny = true;
                    break;
                }
            }
            if (matchAny) {
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

            }
            if (matchAny) {
                for (Iterator<String> i = packageStatsMap.keySet().iterator(); i.hasNext();) {
                    String packageName = i.next();
                    Matcher m = classPattern.matcher(packageName);
                    if (!m.lookingAt()) {
                        i.remove();
                    }

                }
            }
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

            headerString = header.substring(cookieHead.length());
        }

        // parse cookie name/value pair
        matcher = NAME_PATTERN.matcher(headerString);
        if (matcher.lookingAt()) {
            list = new ArrayList<CmisHttpCookie>();
            cookie = new CmisHttpCookie(matcher.group(1), matcher.group(2));
            cookie.setVersion(version);

            /*
 
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

        // parse cookie headerString
        while (!(headerString.length() == 0)) {
            matcher = cookie.getVersion() == 1 ? ATTR_PATTERN1.matcher(headerString) : ATTR_PATTERN0
                    .matcher(headerString);

            if (matcher.lookingAt()) {
                String attrName = matcher.group(1).trim();

                // handle special situation like: <..>;;<..>
                if (attrName.length() == 0) {
                    headerString = headerString.substring(1);
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

                // delimiter
                if (attrName.equalsIgnoreCase("port") || attrName.equalsIgnoreCase("expires")) {
                    int start = matcher.regionStart();
                    matcher = ATTR_PATTERN0.matcher(headerString);
                    matcher.region(start, headerString.length());
                    matcher.lookingAt();
                } else if (cookie.getVersion() == 1 && attrName.startsWith(COMMA_STR)) {
                    // If the last encountered token is comma, and the parsed
                    // attribute is not port, then this attribute/value pair
                    // ends.
                    headerString = headerString.substring(1);
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

                    // If the last encountered token is comma, and the parsed
                    // attribute is not port, then this attribute/value pair
                    // ends.
                    headerString = headerString.substring(1);
                    matcher = NAME_PATTERN.matcher(headerString);
                    if (matcher.lookingAt()) {
                        cookie = new CmisHttpCookie(matcher.group(1), matcher.group(2));
                        list.add(cookie);
                        headerString = headerString.substring(matcher.group().length());
                        continue;
                    }
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

    });
    sortedEntries.addAll(versions.entrySet());
    for (Map.Entry entry : sortedEntries) {
      String key = (String)entry.getKey();
      Matcher matcher = COORDINATE_KEY_PATTERN.matcher(key);
      if (matcher.lookingAt()) {
        String groupId = matcher.group(1);
        String artifactId = matcher.group(2);
        String coordinate = groupId + ':' + artifactId;
        String version = (String)entry.getValue();
        versionsMap.put(coordinate + ".version", version);
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

  static List<Rule> parseRules(String rules) {
    List<Rule> result = new ArrayList<Rule>();
    String remaining = rules.trim();
    while (remaining.length() > 0) {
      Matcher matcher = ruleParser.matcher(remaining);
      if (!matcher.lookingAt()) {
        throw new IllegalArgumentException("Invalid rule: " + remaining);
      }
      if (matcher.group(2) != null) {
        result.add(new Rule());
      } else {
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

    if (null != m.header) {
      for (String line : m.header.code) {
        Matcher matcher = IMPORT.matcher(line);

        if (matcher.lookingAt()) {
          if (null == matcher.group(3)) {
            String name = matcher.group(2);
            try {
              ast.importType(name, Utilities.getName(name));
            } catch (IllegalArgumentException x) {
View Full Code Here

Examples of java.util.regex.Matcher.lookingAt()

  public Float getWidthFromSvg(String svg) {
    Pattern pattern = Pattern.compile("^<svg[^>]*width=\\\"([0-9]+)",
        Pattern.CASE_INSENSITIVE);
    Matcher matcher = pattern.matcher(svg);
    if (matcher.lookingAt()) {
      return Float.valueOf(matcher.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.