TOOLTIKI Lovable tool, really free
Developer Extract

Extract numbers from text

What to do

Transformed in your browser · nothing is uploaded

Local · a comma decimal cannot be disambiguated
Advertisement
320 × 100

Pulls every number out of a block of text, one per line, keeping decimals and negative signs. Both decimal conventions are recognised — a dot and a comma.

How to use the extract numbers from text

1 Paste your text into the first box.
2 Choose what you want done to it.
3 Copy the result, or save it as a text file.

Recognising the comma as a decimal mark is necessary for European text and creates a genuine ambiguity that nothing can resolve automatically: `3,75` is three and three quarters in Amsterdam and three thousand seven hundred and fifty in London. Both are extracted as written and it is left to you, because guessing would be worse. Note that a number embedded in an identifier — an order number, a postcode — is extracted too, since there is no way to distinguish a quantity from a label without understanding the sentence. Sorting the result numerically afterwards is usually the quickest way to spot the ones that are not quantities.

Questions

It extracts them as written. Whether 3,75 is a decimal or a thousands separator cannot be determined automatically.

MDN — working with strings
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING