text = " There are submitted charges 1500.00 900.00 1300.00 and amount paid by the XXXX patient resp 50 90 1300 9000"
ref_no1 = re.findall(r"(?:(?<=submitted charges))[\d-]+",text)
ref_no2 = re.findall(r"(?:(?<=patient resp))[\d-]+",text)
print(ref_no1)
print(ref_no2)
Required solution:
ref_no1: ['1500.00','900.00','1300.00']
ref_no2: ['50','90','1300','9000']
Is there any solution to get all numbers after a string