【发布时间】:2021-11-05 20:30:41
【问题描述】:
我想从短信中提取余额
我的短信内容是
account ending with ********9415 has been credited with Rs. 5000. Updated account balance is Rs. 13086.18
Your card transaction of Rs.417 is successful. Your updated credit balance is Rs.78,468
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.
这是我目前的代码
(?i)(?:\sbalance\s*)([A-Za-z0-9]+\s[A-Za-z0-9]+)
(?i)(?:\scredit limit\s*)([A-Za-z0-9]+\s[A-Za-z0-9]+)
那么如何从上面的短信中获取金额呢?
【问题讨论】: