Quick answer
An HSBC India NEFT credit SMS looks like this: “HSBC: A/c 074-260***-006 is credited with INR 5000.00 on 27NOV at 06.33.02 with UTR CHASH00007392391 as NEFT from CHAS A/c ***6983 of John Doe . Your Avl Bal is INR 15000.50.” It is a credit (money received) alert. The parts that change in each message are the amount, the date, the merchant or payee, a reference number and the available balance or credit limit; everything else is fixed text, so it can be matched with the regex below.
Template
HSBC: A/c skip is credited with currency amount on date at txn_time with UTR ref as NEFT from skip2 of merchantName . Your Avl Bal is INR balance.
Sample SMS
HSBC: A/c 074-260***-006 is credited with INR 5000.00 on 27NOV at 06.33.02 with UTR CHASH00007392391 as NEFT from CHAS A/c ***6983 of John Doe . Your Avl Bal is INR 15000.50.
| Field | Extracted value |
|---|---|
| skip | 074-260***-006 |
| currency | INR |
| amount | 5000.00 |
| date | 27NOV |
| txn_time | 06.33.02 |
| ref | CHASH00007392391 |
| skip2 | CHAS A/c ***6983 |
| merchantName | John Doe |
| balance | 15000 |
Compiled regex
^HSBC: A/c \s*(?<skip>[\s\S]+?)\s* is credited with \s*(?<currency>[A-Z]{2,4})\s* \s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* on \s*(?<date>(?:\d{2}-[A-Z]{3}-\d{2,4}|\d{2}[A-Z]{3}\d{4}|[\dA-Z\-/ :T]{4,32}))\s* at \s*(?<txn_time>[\s\S]+?)\s* with UTR \s*(?<ref>[\s\S]+?)\s* as NEFT from \s*(?<skip2>[\s\S]+?)\s* of \s*(?<merchantName>[\s\S]+?)\s* \. Your Avl Bal is INR \s*(?<balance>[\s\S]+?)\s*\.JSON/api/templates/hsbc-neft-credit-v1
{
"id": "hsbc-neft-credit-v1",
"name": "HSBC_NEFT_CREDIT_V1",
"bank": {
"code": "HSBC",
"name": "HSBC India",
"slug": "hsbc-india"
},
"category": "NEFT",
"payment_mode": "BANK",
"direction": "credit",
"keywords": [
"HSBC",
"is credited with",
"as NEFT from"
],
"template": "HSBC: A/c {skip} is credited with {currency} {amount} on {date} at {txn_time} with UTR {ref} as NEFT from {skip2} of {merchantName} . Your Avl Bal is INR {balance}.",
"regex": "^HSBC: A/c \\s*(?<skip>[\\s\\S]+?)\\s* is credited with \\s*(?<currency>[A-Z]{2,4})\\s* \\s*(?<amount>[\\d,]+(?:\\.\\d{1,2})?)\\s* on \\s*(?<date>(?:\\d{2}-[A-Z]{3}-\\d{2,4}|\\d{2}[A-Z]{3}\\d{4}|[\\dA-Z\\-/ :T]{4,32}))\\s* at \\s*(?<txn_time>[\\s\\S]+?)\\s* with UTR \\s*(?<ref>[\\s\\S]+?)\\s* as NEFT from \\s*(?<skip2>[\\s\\S]+?)\\s* of \\s*(?<merchantName>[\\s\\S]+?)\\s* \\. Your Avl Bal is INR \\s*(?<balance>[\\s\\S]+?)\\s*\\.",
"regex_flags": "i",
"sample": "HSBC: A/c 074-260***-006 is credited with INR 5000.00 on 27NOV at 06.33.02 with UTR CHASH00007392391 as NEFT from CHAS A/c ***6983 of John Doe . Your Avl Bal is INR 15000.50.",
"verified": true,
"source": "pennywise"
}Frequently asked questions
What does an HSBC India NEFT credit SMS look like?
HSBC: A/c 074-260***-006 is credited with INR 5000.00 on 27NOV at 06.33.02 with UTR CHASH00007392391 as NEFT from CHAS A/c ***6983 of John Doe . Your Avl Bal is INR 15000.50. — the parts that change are the amount, the date, the merchant or payee, a reference number and the available balance or credit limit.
How do I parse an HSBC India NEFT SMS?
First check that the message contains “HSBC”, “is credited with”, “as NEFT from”. Then match it with this case-insensitive regular expression: ^HSBC: A/c \s*(?<skip>[\s\S]+?)\s* is credited with \s*(?<currency>[A-Z]{2,4})\s* \s*(?<amount>[\d,]+(?:\.\d{1,2})?)\s* on \s*(?<date>(?:\d{2}-[A-Z]{3}-\d{2,4}|\d{2}[A-Z]{3}\d{4}|[\dA-Z\-/ :T]{4,32}))\s* at \s*(?<txn_time>[\s\S]+?)\s* with UTR \s*(?<ref>[\s\S]+?)\s* as NEFT from \s*(?<skip2>[\s\S]+?)\s* of \s*(?<merchantName>[\s\S]+?)\s* \. Your Avl Bal is INR \s*(?<balance>[\s\S]+?)\s*\.. The named groups give you the amount, the date, the merchant or payee, a reference number and the available balance or credit limit.
Is this HSBC India SMS format verified?
Yes. The template is checked automatically against a real, redacted message on every build, and the build fails if it stops matching.