@Override
	protected void inspectContents(File file, String contents) {
		StringBuffer buf = new StringBuffer();
		
		// Split it into lines
		StringSplitter splitter = new StringSplitter(contents, getLineEnding());
		
		// Scan each line
		int totalMatchesForThisFile = 0;
		int lineCount = 1;
		while (splitter.hasMoreElements()) {
			String line = (String) splitter.nextElement();
			
			input = new PatternMatcherInput(line);
			try {
				while(util.match(regex, input)) {
					result = util.getMatch();  
					totalMatchesForThisFile++;
					totalNumberOfMatches++;
					buf.append("  line: " + lineCount + " position: " + result.beginOffset(0) + getLineEnding());
				}
			} catch (MalformedPerl5PatternException e) {
				System.out.println("MalformedPerl5PatternException: " + e.getMessage());
				System.out.println("Valid expression: [m]/pattern/[i][m][s][x]");
				return;
			}
			
			lineCount++;
		}

		// Output the results
		if (totalMatchesForThisFile > 0) {
			if (totalMatchesForThisFile == 1) {
				System.out.println("Found " + totalMatchesForThisFile + " match in file: " + file.getPath());
			} else {
				System.out.println("Found " + totalMatchesForThisFile + " matches in file: " + file.getPath());			
			}
			System.out.print(buf.toString());
			System.out.println("");
		}
	}