0

I'd like to extract multiple price values from a unicode text which may have multiple currencies and prefixes right before the value itself. Possible situations are:

An apple costs: 1,01 €
2€ for an apple
The $1.21 apple
...

So the most likely prefixes are whitespace, €/$/etc, \n and a whitespace is mostly closing the range of the value.

There are a bunch of questions about finding a string between two other strings - unfortunately nothing worked for me yet, like this:

result = re.findall(r'\s+(.*?)€\s', lowerCaseDescrip, re.DOTALL)

Maybe using re isn't the best solution for this situation?

Community
  • 1
  • 1
user3191334
  • 1,148
  • 3
  • 15
  • 33

0 Answers0