Package cli.System.Text.RegularExpressions

Examples of cli.System.Text.RegularExpressions.GroupCollection


    * within the regular expression
    */

    public String getRegexGroup(int number) {
        if (!isMatching()) return null;
        GroupCollection groups = match.get_Groups();
        if (number > groups.get_Count() || number < 0) return "";
        String s = groups.get_Item(number).get_Value();
        if (s==null) return "";
        return s;
    }
View Full Code Here


        //System.err.println("getRegexGroupIterator");
        if (!isMatching()) {
            //System.err.println("no match");
            return null;
        }
        GroupCollection groups = match.get_Groups();
        int c = groups.get_Count();
        //System.err.println("groups: " + c);
        if (c == 0) {
            return EmptyIterator.getInstance();
        } else {
            StringValue[] groupArray = new StringValue[c-1];
            IEnumerator e = groups.GetEnumerator();
            int i=0;
            // we're not interested in group 0
            e.MoveNext();
            e.get_Current();
            while (e.MoveNext()) {
View Full Code Here

TOP

Related Classes of cli.System.Text.RegularExpressions.GroupCollection

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.