Live Developer Workbench

Regex Query Playground

Test and refine carrier SMS regular expressions in real-time. Inspect named capture group extraction and copy production-ready backend code in Node.js, Python, or Go.

Presets:
Exec: 1.2ms
Type or edit text above to see live parsing resultsLength: 136 chars
Generate Backend Code
// Regex Parser in TypeScript / Node.js
export function parseSms(smsText: string) {
  const pattern = /You have received Tk (?<amount>[0-9,]+(?:\.[0-9]{2})?) from (?<senderPhone>01[3-9]\d{8})\..*?TrxID (?<trxId>[A-Z0-9]{8,12})/;
  const match = smsText.match(pattern);
  if (!match?.groups) return null;
  return {
    amount: parseFloat(match.groups.amount.replace(/,/g, '')),
    senderPhone: match.groups.senderPhone,
    trxId: match.groups.trxId
  };
}
Extracted Metadata
Valid Payment Pattern
Extracted Amount
1,500 BDT
Transaction ID (TrxID)
BL72H9XJ
Provider Identified
bKash
Sender Account/Phone
01712345678
JSON Payload Dispatched to Webhook:
{
  "provider": "bKash",
  "amount": 1500,
  "currency": "BDT",
  "trxId": "BL72H9XJ",
  "senderPhone": "01712345678",
  "timestamp": "2026-09-24T14:45:00.000Z"
}

Need custom pattern assistance?

Read our complete guide to Named Capture Groups.

Read Docs