Code example for Matcher

Methods: end, lookingAt, reset, start

0
 
        public String match(String path) {
            if (matcher == null)
                matcher = pattern.matcher(path);
            else 
                matcher.reset(path);
            if (matcher.lookingAt()) {
                return path.substring(matcher.start(), matcher.end());
            } 
            return null; 
        } 
    } 
 
    private final static Logger LOG = Logger.getLogger(RewriteConfig.class); 
 
    // the list of established mappings 
    private List<Mapping> mappings = new ArrayList<Mapping>();
 
    // parent XQueryURLRewrite 
    private XQueryURLRewrite urlRewrite;