May I know what exactly you are scanning using OCR scrape? is it some sort of a PDF file that contains paragraphs of data? or does it have some sort of a standard structure? Bit more explanation about your source would help pinpoint a solutionā¦
In your source, just before the value you need to extract, does it have a unique identification? some thing like, say if you want to extract a name āLahiru Fernandoā, Lahiru being the first & Fernando being the last, does it have unique identification like āFirst Nameā, āLast Nameā etc?