Code example for Matcher

Methods: endfindgroupgroupCount

0
 
    // TODO: use multiscan?! 
    private String scan(String regexp) {
        String result = null;
        Matcher matcher = scanner.getMatcherForPattern(regexp);
        if (matcher.find(0) && matcher.groupCount() > 0) {
            int end = matcher.end();
            consume(end);
            return matcher.group(1);
        } 
        return result;
    } 
 
    // private int indexOfDelimiters(char start, char end) { 
    // String str = scanner.getInput(); 
    // int nstart = 0; 
    // int nend = 0; 
    // int pos = 0; 
    // for (int i = 0, len = str.length(); i < len; ++i) { 
    // if (start == str.charAt(i)) { 
Stop searching for code, let great code find you!  Add Codota to your java IDE