Code example for Matcher

Methods: find, group

0
		String line = value.toString();
		 
		if (line.contains("incomplete")) {
			Matcher matcher = incompletePass.matcher(line);
			 
			if (matcher.find()) {
				context.write(new Text(matcher.group(1) + "-" + matcher.group(2)), new PassWritable(1,Integer.parseInt(matcher.group(3))));
			} else { 
				context.getCounter("inc", "notfound").increment(1);
				logger.warn("Did not match \"" + line + "\"");
			} 
		} 
	} 
}