I want to parse last indian currency ie Rs from a string.
For example:
- Price for this item is Rs. 100 –> 100
- Price for this item is Rs. 100 to Rs. 120 –> 120
- Price for this item is Rs. 100.2 to Rs. 125.4 –> 125.4
- Price for this item is Rs. 100 to Rs. invalid_price –> 100
- Price for this item is Rs. 100 to 125 –> 100, not 125 cause 125 is having Rs. in front of it.
Rs. or Rs both will be fine. I want to get number prepended with Rs. or Rs
How can I parse this string.
Goal is get the rightmost occurance of:
Solution: