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

后端 未结 4 842
心在旅途
心在旅途 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:49

    In python following Regex can be helpful.

    For finding amount in bank messages

    [rR][sS]\.?\s[,\d]+\.?\d{0,2}|[iI][nN][rR]\.?\s*[,\d]+\.?\d{0,2}
    

    For finding A/C no

    [0-9]*[Xx\*]*[0-9]*[Xx\*]+[0-9]{3,}
    

提交回复
热议问题