sS ocr_checkForRegexp(BufferedImage img, S regexp) { BWImage bw = new(img); L rects = autoSegment(bw, ocr_recognizeMultiLine_scored_g); ret ocr_checkForRegexp(bw, rects, regexp); } sS ocr_checkForRegexp(BWImage img, L rects, S regexp) { LS texts = ocr_recognizeMultiLine(img, rects); if (nempty(texts)) print("Texts found: " + sfu(texts)); ret regexpFirstGroup_any(regexp, texts); }