Regex Transaction Parser
Test JavaScript regular expressions against transaction descriptions, inspect capture groups, and review the match rate.
How it works
Enter a JavaScript regular expression and sample descriptions, one per line. The parser tests each nonblank line once with case insensitive matching and shows the first match and its captures.
Choose group 0 for the complete match or a positive group number for a captured value. Review the matched status, category, and coverage for each line. Blank lines are ignored.
The category map groups matched descriptions by the selected value. An optional capture can be absent even when the overall pattern matches, so inspect the line results as well as the grouped totals.
Use a small representative sample to refine a pattern, then verify the result against the original data in your own workflow.
Step by step
- Enter a regular expression and sample descriptions
- Choose the full match or a capture group
- Review line results and coverage
Worked example
Enter the pattern (AMAZON|NETFLIX|UBER), choose capture group 1, and paste AMAZON PURCHASE, NETFLIX SUBSCRIPTION, and GROCERY STORE on separate lines.
The first two lines match and the third does not. The selected capture values are AMAZON and NETFLIX, and coverage is 66.67%.
When to use this tool
Use this parser to test a JavaScript regular expression against transaction description samples and inspect the selected capture value.
It helps examine pattern behavior on entered text. It does not read transaction files, connect to accounts, or confirm financial classifications.
Common mistakes
A successful match does not prove that the category is correct. Check matched text and capture values against the original descriptions, especially when patterns overlap.
Coverage uses only the nonblank lines entered here. A high rate on a small sample does not establish how a pattern will perform on other statements.
How matching works
Run RegExp(pattern, "i") once per nonblank line and use the first exec result. Coverage = matched nonblank lines ÷ all nonblank lines × 100. Group 0 is the complete matched text; positive group numbers select captures.
The pattern uses fixed case insensitive matching. This tool shows text matches and captures only. It does not parse a file format, clean descriptions, or create a transaction export.
Limits and assumptions
The parser supports JavaScript regular expression syntax with the fixed i flag. It tests at most 1,000 nonblank lines, up to 100,000 sample characters, and a pattern of up to 2,000 characters. The selected group must be between 0 and 10 and must exist in the pattern. Worker startup can take up to five seconds, followed by a 250 millisecond limit for each evaluation. This is not a CSV parser, a bank connection, or a transaction validation service. The explanation lists common syntax only and does not validate the meaning of a pattern.
Key terms
- Matched text
- The complete text returned by the first match on a line.
- Capture group
- A parenthesized part of a match. Group 1 is the first capturing group.
- Coverage
- Matched nonblank sample lines divided by all nonblank sample lines, as a percentage.
Related tools
Use a text utility to prepare descriptions before testing a pattern. This page tests matching and capture behavior only.
For database schemas, use a schema conversion utility. This parser does not read transaction files or connect to financial accounts.
FAQ
What does this transaction regex tool do?
The parser applies your pattern to each nonblank description using JavaScript regular expression matching with the case insensitive flag. Each line gets its first match and capture groups. It does not split CSV fields or infer a merchant from text outside the selected group.
How are capture groups numbered?
Group 0 is the full matched text. Group 1 is the first set of capturing parentheses, and higher numbers follow their opening order. Noncapturing groups such as (?:...) do not receive a number. A match can succeed even when an optional capture is absent.
What does coverage mean?
Coverage is the share of nonblank sample lines with a match, multiplied by 100 and rounded to two decimal places. It describes only the text you entered and is not a measure of pattern quality on other transactions.
How is the category value selected?
A line is matched when JavaScript RegExp.exec finds a match. The category is the complete match for group 0 or the selected capture for a positive group number. If a capture did not participate, the line remains matched but has no category value.
How should I check a pattern?
Start with a short sample that includes expected matches and nonmatches. Use parentheses around the text you want as the category, then inspect every line and capture before applying the pattern elsewhere. The explanation is a basic syntax aid, not a full regular expression parser.
Related tools
A schema conversion utility turns supported table definitions into TypeScript shapes. Use a schema tool for database structures rather than transaction descriptions.