Skip to content

Extract Text

Pull out the text between two markers, or everything matching a pattern.

Quick Tool Overview

Extract Text pulls out whatever sits between two markers — quotes, brackets, tags or anything you type — on every line or throughout a document. A regular expression mode with capture group support handles the cases a pair of markers cannot.

What it does
Extracts the text between two markers or matching a pattern
You give it
A config file, URL column, markup block or structured text
You get back
The extracted values, one per line
Best for
Pulling one field out of many structured lines
Text Tools Free, unlimited use No sign-up Runs in your browser

About the Extract Text

Extracting the part of a string you actually want is a job that recurs endlessly and usually gets done by hand. The value inside quotes on every line of a config file. The text between two tags in a hundred rows of markup. The bit inside the brackets in a list of references. The ID between the last slash and the query string in a column of URLs.

This does all of them. Give it a start marker and an end marker and it pulls out everything between the two, on every line or throughout the whole text. There are presets for the common cases — quotes, brackets, parentheses and HTML tags — and a regular expression mode for anything else, with capture group support so you can extract one part of a match rather than the whole thing.

Key features of the Extract Text

Presets for the common cases

Quotes, brackets, parentheses and HTML tags are one click rather than four characters of typing.

Line-by-line extraction

Each row is searched independently, so a column of values gives a column of results still in order.

First match or all matches

Keep rows aligned with one result per line, or collect every occurrence when the count varies.

Capture group support

A regular expression with a group extracts just that group, which is how you get one field out of a structured line.

Markers optional in the result

Return the contents, or the whole matched span including its delimiters.

How to use the Extract Text

  1. 1

    Paste your text

    A config file, a set of URLs, a block of markup or any structured text.

  2. 2

    Set the markers

    Type a start and end marker, or use a preset for quotes, brackets, parentheses or tags.

  3. 3

    Choose how many matches

    The first match on each line, or every match throughout the text.

  4. 4

    Copy the extracted values

    The results come back one per line, ready to paste into a spreadsheet.

Frequently asked questions

Yes, and that is the default. Each line is searched independently, so a column of values gives you a column of results with the rows still lined up.

Reviews of the Extract Text

What people who use the Extract Text think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Extract Text. It takes half a minute and no account.

Write the first review

More text tools