Package org.apache.regexp

Examples of org.apache.regexp.StringCharacterIterator


    if (srclongStr == null || str == null) {
      throw new IllegalArgumentException("参数不正确,不能是null对象!");
    }
    List strList = new ArrayList();
    RE patt = new RE(str);
    StringCharacterIterator in = new StringCharacterIterator(srclongStr);
    int end = 0;

    while (patt.match(in, end)) {
      int start = patt.getParenStart(0);
      end = patt.getParenEnd(0);
      strList.add(in.substring(start, end));
    }

    String[] tempStr = (String[]) strList.toArray(new String[strList.size()]);
    return tempStr;
  }
View Full Code Here

TOP

Related Classes of org.apache.regexp.StringCharacterIterator

Copyright © 2018 www.massapicom. 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.