Yueseryueser.com

← All guides

Keep Only Numbers: Pulling Values Out of a Paragraph

Shipping 12, quantity 3 becomes 12 3, with every other character dropped. Paste that into a spreadsheet, split on spaces, and the values are ready to sum or pivot instead of being picked out one at a time.

Open the tool:Keep Only Numbers

When extracting numbers is the job

Quotes copied out of chat, email, or a PDF bury the numbers inside sentences, and working out a total means pulling them out first. Values copied from a monitoring screenshot or a report are mixed with labels and need to become plain numbers before they enter a sheet. Ten values by hand is fine; fifty is where errors start.

It also works as a proofreading pass: extract every number from a passage into one line and look for outliers, such as 120 where 12 was meant, or an extra zero. Numbers collected together are easier to scan than the same digits buried in prose.

How to extract without losing meaning

Only digit characters survive, runs of digits are separated by single spaces, and everything lands on one line with no wrapping. Decimal points, minus signs, percent signs, and thousands separators are dropped: 3.14 becomes 3 and 14, -5 becomes 5, and 1,200 becomes 1 and 200.

Chinese numerals such as 十二 or 三百 are not recognised, digits inside words are pulled out (the 15 in iPhone15), and a date like 2026-10-25 splits into three numbers. Decide which numbers you actually need before extracting, and normalise the format if the input is inconsistent.

Where it stops, and what to use instead

It extracts everything, without distinguishing amounts from quantities or IDs, and without caring which line a number came from. With multi-line input all numbers end up on one line: the order survives but the line association does not. If you need per-line correspondence, process line by line or use a spreadsheet function.

It also cannot keep decimals, avoid splitting thousands separators, or read Chinese numerals. To keep decimals, replace the decimal point with a placeholder character first and restore it afterwards; for per-line results, a regex replace in an editor is more reliable.

FAQ

What happens to a decimal like 3.14?

It is split into 3 and 14, with the decimal point dropped and a space in between. If you need decimals preserved, swap the decimal point for a placeholder character first, then restore it after extracting.

Are the numbers one per line or all in a row?

They come back on a single line, with one space between each number and no automatic wrapping. To turn them into a column, paste into a spreadsheet, split on spaces, then transpose the result.

Are minus signs kept for negative numbers?

No. A minus sign is not a digit, so it is dropped and -5 extracts as 5. If the sign matters, replace it with a marker character before extracting and restore it afterwards, or use a regex-capable tool.

Related tool:Keep Only Numbers