I want to divide the line into a date, description, and amount. The last digits are the amount that can contain Cr. I have a line like the following:
Date Description Amount
13/03/2021 XYZ ABC 428.00 31,408.37 Cr
17/03/2021 ZOOM.US 111-222-333 WWW.ZOOM.U USD 5.29 841.18
The regex that I used is:
regex_filter = re.compile(r'(\d{2}/\d{2}/\d{4}) (.*?) ([\d,]+\.\d{2}) ')**
And what I got is:
Date - 13/03/2021
Description - XYZ ABC
Amount - 428.00
I want the amount to be 31,408.37 Cr and for the second one amount should be 841.18. So I want digits and characters up to a space reading from the end.
How can I get this?

