Named groups make a structured text extraction easier to read than unexplained numeric indexes. This older example split a Vietnamese message into four lines, then extracted an amount and payment time from the first line:
const body = 'Số dư tài khoản vừa tăng 100.000.000 vào 25/11/2019 14:41 VN\n' +
'Số dư hiện tại: 1.389.944 VND\n' +
'Mô tả: ssssssss FT1s99982\n' +
'Số tài khoản: xxxxxxx’;
const bodyArr = body.split(/\r?\n/);
// Body must be 4 lines
if(bodyArr.length !== 4) return null;
const firstLineRegex = RegExp('^(Số dư tài khoản vừa tăng) (?<amount>[1-9][\\d+.]*) (vào) (?<paymentTime>\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}:\\d{2} VN)$', 'g');
const firstLineData = firstLineRegex.exec(bodyArr[0]);
if(firstLineData === null || !firstLineData.groups) return null;
console.log(parseInt(firstLineData.groups['amount'].replace(/\./gm, '')));
console.log(firstLineData.groups['paymentTime']);
// 100.000
// 25/11/2019 14:41 VN
The code removes dots before parsing the amount. Its trailing output comment does not match the large amount in the sample input, so it should not be treated as verified output. The sample also ends one string with a typographic quote, and the early return statements assume a surrounding function.
The amount character class accepts more than a strict currency grammar. This is a historical parsing exercise, not proof that a payment occurred or a validated financial-message parser.