I am trying to open a receipt and read the position. Therefore, after I get the position, I wanted to get the price of the goods with the currency symbol.
CHOC. ORANGE x £1.00
I tried to break the text with the pound sign, but in some cases, OCR mistakenly transfers the pound to some other characters.
So, is there a way in regex to read characters from the end of the line and stop when it encounters a space of more than 3? Or do I need to write my own algorithm?
I tried to get the last word from the end of the line, but this also fails when it comes across punctuation or space.
\b(\w+)$
source
share