Number & Pattern Extractor
A number and pattern extractor pulls every matching token out of a block of pasted text, so the figures buried in a log file, an exported report, a SERP scrape, or a wall of copy can be isolated, counted, and totalled without hand-picking them one at a time. Pick a preset for integers, decimals, prices, phone numbers, percentages, or years, or write a custom regular expression, and the tool returns an ordered list plus live stats.
This extractor is free and runs entirely in your browser. The text never leaves the page, the regular expressions execute locally, and a custom pattern is wrapped in a guarded check so a malformed expression shows an error instead of breaking the page.
g) is added automatically so every match is found. Your pattern runs in a guarded try/catch.
🔒 Private: everything runs in your browser. Nothing you paste is uploaded.
How to use the number and pattern extractor
Paste the text, choose what to extract, and the matches appear instantly. Toggle duplicate removal or sorting, read the sum and average for numeric presets, then copy the list or download it as CSV.
Choose a preset or write your own regex
Each preset is a real regular expression tuned for one job: integers ignore decimal tails, the price preset reads currency symbols and ISO codes on either side of an amount, and the phone preset keeps only runs of seven or more digits so stray numbers are not mistaken for a contact. When none of the presets fit, switch to custom and enter your own pattern with flags. The expression is compiled in a guarded block, so an unbalanced bracket or bad escape surfaces a clear error pill rather than failing silently or freezing the tool.
Read the count, sum, and average before exporting
Beyond the raw list, the tool reports how many matches it found and, for numeric presets, the sum, average, minimum, and maximum of the extracted values. Grouping commas, currency symbols, and percent signs are stripped before the math runs, so a price like $1,299.50 is totalled as 1299.5. Turn on duplicate removal to see how many repeated tokens were dropped, which is useful when reconciling order numbers or reference codes. These stats give a fast sanity check that the pattern caught what you expected before the data moves anywhere else.
Copy the list or download a clean CSV
Once the matches look right, copy them as a newline-separated list straight into a spreadsheet, or download a CSV with an index column, the matched text, and, for numeric presets, a parsed numeric value column ready for SUM and AVERAGE formulas. Every value is quoted to the CSV standard, so a match containing a comma or a line break will not corrupt the columns. Because the export is generated in the browser from the text you pasted, no upload happens and the file lands directly in your downloads folder.
Number and pattern extractor frequently asked questions
Q1What can this tool extract from pasted text?
It has presets for integers, decimals, prices and currency amounts, phone numbers, percentages, and years from 1900 to 2099. For anything else, the custom option accepts your own regular expression and flags, so you can pull email addresses, SKUs, hashtags, IDs, or any pattern you can describe. Numeric presets also calculate sum, average, minimum, and maximum from the matches they find.
Q2Is my pasted text sent to a server?
No. The extractor runs entirely in client-side JavaScript inside your browser. The text you paste, the regular expressions, and the CSV export are all processed locally, and nothing is uploaded, logged, or stored. Once the page has loaded it works offline, which makes it safe to use on confidential logs, exports, or unpublished content without privacy concerns.
Q3Will a broken custom regular expression break the page?
No. Every custom pattern is compiled inside a guarded try-and-catch block. If the expression is invalid, such as an unbalanced bracket or a bad escape, the tool shows a red error pill with the reason and stops, instead of throwing an exception or freezing. A global flag is added automatically so the pattern captures every match rather than only the first one in the text.
Q4How are sum and average calculated for prices and percentages?
Before the math runs, each match is cleaned of grouping commas, currency symbols, and percent signs, leaving the sign and decimal point intact. So $1,299.50 becomes 1299.5 and 8.875% becomes 8.875. The tool then totals and averages those parsed values. Any match that does not parse to a real number is skipped from the calculation but still appears in the list above.
Q5Why does the same number sometimes appear more than once?
By default the tool lists every match in the order it appears, so a value that occurs three times in the text is shown three times. That preserves an accurate count and an honest sum. Turn on remove duplicates to collapse repeats to a single entry, and the stats panel reports how many duplicate tokens were dropped so nothing is hidden.
