Code example for Matcher

Methods: end, find, group, groupCount

0
            MixinInject tok = new MixinInject(matcher.group(1), lineno);
            consume(matcher.end());
 
            matcher = scanner.getMatcherForPattern("^ *\\((.*?)\\)");
 
            if (matcher.find(0) && matcher.groupCount() > 0) {
                // verify group does not contain attributes 
                Matcher attributeMatcher = Pattern.compile("^ *[-\\w]+ *=").matcher(matcher.group(1));
                if (!attributeMatcher.find(0)) {
                    tok.setArguments(matcher.group(1));
                    consume(matcher.end());
                } 
            } 
            return tok;
        } 
        return null; 
    } 
 
    private Token attributes() { 
        if ('(' != scanner.charAt(0)) {
            return null;