in app/redact/TextFinder.scala [46:56]
def findMultiple(needle: String, haystack: String): List[Int] =
s"(\\b|_|\\.)$needle(\\b|_|\\.)".r.findAllMatchIn(haystack).toList.map(_.start)
def analyse(doc: PDDocument) = {
val textPrinter = new AnalyseCV()
textPrinter.getText(doc)
textPrinter.candidates.result().foldRight((doc.getNumberOfPages, List.empty[Candidate])) {
case (candidate, (lastPage, candidates)) =>
(candidate.firstPage -1, candidate.copy(lastPage = lastPage) :: candidates)
}._2
}