Code example for Matcher

Methods: end, find, group, groupCount

0
        return null; 
    } 
 
    private Token each() { 
        Matcher matcher = scanner.getMatcherForPattern("^(?:- *)?(?:each|for) +(\\w+)(?: *, *(\\w+))? * in *([^\\n]+)");
        if (matcher.find(0) && matcher.groupCount() > 1) {
            consume(matcher.end());
            String value = matcher.group(1);
            String key = matcher.group(2);
            String code = matcher.group(3);
            Each each = new Each(value, lineno);
            each.setCode(code);
            each.setKey(key);
            return each;
        } 
        return null; 
        /* 
		 * if (captures = /^(?:- *)?(?:each|for) +(\w+)(?: *, *(\w+))? * in 
		 * *([^\n]+)/.exec(this.input)) { this.consume(captures[0].length); var 
		 * tok = this.tok('each', captures[1]); tok.key = captures[2] || 
		 * '$index'; tok.code = captures[3]; return tok; }