Package org.jregex

Examples of org.jregex.MatchIterator


                public Object activate(IokeObject method, Object on, List<Object> args, Map<String, Object> keywords, IokeObject context, IokeObject message) throws ControlFlow {
                    String arg = Text.getText(Interpreter.send(context.runtime.asText, context, args.get(0)));
                    Matcher m = ((Regexp)IokeObject.data(on)).regexp.matcher(arg);

                    List<Object> result = new ArrayList<Object>();
                    MatchIterator iter = m.findAll();
                    Runtime runtime = context.runtime;
                    while(iter.hasMore()) {
                        result.add(runtime.newText(iter.nextMatch().group(0)));
                    }

                    return runtime.newList(result);
                }
            }));
View Full Code Here

TOP

Related Classes of org.jregex.MatchIterator

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.