I need help with the regex pattern for the below string to extract the amount along with the currency symbol highlighted below. The word before the currency symbol can vary, in this case it is Cost but it will vary case to case, but the word Out of Pocket is constant across all the cases.
Cost £ 341,072 Out of Pocket
Regexp pattern I used is : \S\s\S+(?=\s+Out\sof\sPocket) but I think it is not reliable so can anyone suggest a better expression for this to work?
This is works, thank you for your quick reply. But the currency symbol varies too, it can be pounds, dollars or anything else, sorry I did not mention it earlier. Thanks for your help.