import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String regex = "(?i)\\b(?:balance|credit\\s+limit)\\s+[A-Za-z]+(?:\\s+[A-Za-z]+)*\\s+Rs\\.\\s*(\\d+(?:[.,]\\d+)*)";
        String string = "account ending with ********9415 has been credited with Rs. 5000. Updated account balance is Rs. 13086.18\n\n"
	 + "Your card transaction of Rs.417 is successful. Your updated credit balance is Rs.78,468\n\n"
	 + "Dear Cardmember, payment of Rs.7657.00 has been received towards your Bank Credit Card ending with 3459 on 12-11-2020 through NEFT. Payment is subject to realisation. Your available Credit limit now is Rs. 173281.31.";
        
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(string);
        
        while (matcher.find()) {
            System.out.println(matcher.group(1));
        }
	}
}