Extract From Text

Paste messy text and extract every number, every hashtag or every @mention into a clean list. For numbers you also get the total, smallest, largest and average.

Worked examples

Numbers in a sentence

I have 3 cats, 12.5 kg of food and £1,234.50 saved

3 12.5 1,234.50

The total is shown under the list.

Hashtags and mentions

Loving #london with @sam_1 and #Paris2024

#london @sam_1 #Paris2024

Listed in the order they appear.

About Extract From Text

Useful details are often buried in a block of text: the amounts in an email, the figures in a report, the hashtags in a batch of posts or the people mentioned in a thread. Copying them out one at a time is slow and you can miss some. This tool finds them all and lists them cleanly, one per line, separated by commas or by spaces.

For numbers it reads whole numbers, decimals and numbers with thousands commas, such as 1,234.50, and works out the count, total, smallest, largest and average. A minus sign counts only when it stands on its own, so 2020-10 is two numbers and not a negative. For social text it finds hashtags in any alphabet and @mentions, ignoring email addresses and hashtags made only of digits, and it can leave off the symbols and remove repeats.

How to use Extract From Text

  1. Paste your text into the box.
  2. Choose whether to extract numbers, hashtags, mentions or both tags and mentions.
  3. Set the options: order and negative numbers for numbers, or symbols for tags, and whether to remove repeats.
  4. Copy the list, and read the totals if you extracted numbers.

Common uses

  • Adding up the amounts mentioned in an email or a set of notes
  • Collecting every hashtag from a batch of posts
  • Making a list of the accounts mentioned in a thread
  • Finding the largest and smallest figures in a report

Frequently asked questions

Are currency symbols included?

No. The symbol is left behind and only the number is listed, so £1,200 gives 1,200.

Why is 2020-10 two numbers?

A dash between two digits is a separator, not a minus sign. A minus counts only when there is nothing but a space or a line start before it, as in "temperature -5".

What counts as a hashtag?

A # followed by letters, digits or underscores, in any alphabet, with at least one non-digit, so #2024 is not a hashtag but #a1 and #café are. A # in the middle of a word or after an ampersand is ignored.

Why are email addresses not listed as mentions?

A mention must start the word, with a space or punctuation before the @. In an address, a letter comes before the @, so it is skipped.