Extract (parse) amount and description from BIZ (Transaction) sms

后端 未结 4 853
心在旅途
心在旅途 2021-01-31 12:00

I am doing below steps.

  1. match sms with regex

  2. if contains specified keyword then get values from sms body like amount,description (reason

4条回答
  •  悲哀的现实
    2021-01-31 12:46

    The following two regular expressions helped in finding amount from most of the bank transactions(HDFC, ICICI, ING, KOTAK, SBI, CANARA, PNB):

    [Ii][Nn][Rr](\\s*.\\s*\\d*)
    [rR][sS](\\s*.\\s*\\d*)
    

    Please comment if you have figured out much better expressions than the above.

提交回复
热议问题