Package sunlabs.brazil.util.regexp

Examples of sunlabs.brazil.util.regexp.Regsub.matched()


        matches++;
        matchList.append(" " + matches);
        if (names != null) {
                  if (!names[0].equals("X")) {
          props.put(name + matches + "." + names[0],
            rs.matched());
      }
        } else {
      props.put(name + matches, rs.matched());
        }
View Full Code Here


                  if (!names[0].equals("X")) {
          props.put(name + matches + "." + names[0],
            rs.matched());
      }
        } else {
      props.put(name + matches, rs.matched());
        }

        // use sub-match as an index instead of a number

        String otherKey = null;
View Full Code Here

  if ((sort == null) && (reverse == false)) {
      while (st.hasMoreTokens()) {
    if (isRe) {  // previous token
       Regsub rs = ((ReStringTokenizer)st).getRs();
       String matched = rs.matched();
       if (matched != null) {
           local.push(name + ".delim", matched);
           int subs = rs.getRegexp().subspecs();
           for(int i=1; i<subs;i++) {
          String sub = rs.submatch(i);
View Full Code Here

       if (all) {    // all matches
           Regsub rs = new Regsub(r, value);
           StringBuffer counter = new StringBuffer();
           while(rs.nextMatch()) {
         matches++;
         props.put(prefix + matches, rs.matched());
         for (int i = 1; i < subMatches; i++) {
             String s = mapTable.length >= i ? mapTable[i-1] : "" + i;
             props.put(prefix + matches + "." + s,
               (rs.submatch(i)==null ? nullStr : rs.submatch(i)));
         }
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.