1001Ferramentas
✂️ Text

Extract Text Between Delimiters

Extracts every chunk located between a start and an end marker, with options to include the delimiters, drop duplicates and count occurrences.

Options

How the matching works

In literal mode both markers are escaped before the search, so characters like . * ( ) $ are taken as plain text. The chunk in the middle is captured lazily: with <b>one</b> and <b>two</b> in the same line you get two results, not one giant chunk starting at the first <b> and ending at the last </b>.

Leaving the end marker empty reads from the start marker to the end of the line, which is the quickest way to pull a field out of a log. Leaving the start marker empty does the opposite: from the beginning of the line up to the marker. When both markers are the same character, such as a quote, the chunks are read in consecutive pairs.

How to extract text between two markers

Anyone working with logs, system exports or pasted HTML keeps needing the same cut: grabbing whatever sits between two markers. In a line such as 2026-07-20 10:33 [ERROR] queue 'orders' has no consumer, the interesting part is the name between quotes. This tool does it in bulk: type the start marker, the end marker, and get every chunk listed separately, ready to paste into a sheet or a script.

The match is lazy rather than greedy, and that changes the outcome more than it sounds. With two pairs of b tags on the same line, a greedy search would return one long chunk starting at the first opening tag and ending at the last closing one. Here you get two separate results instead. A less obvious detail: leaving the end marker empty reads from the start marker to the end of the line.

When the start marker equals the end marker, as happens with a quote character, chunks are read in consecutive pairs: the first pair becomes one result, the second pair another, and the page says so on screen. The options cover the rest of the job: trim each chunk, drop duplicates, count how many occurrences exist and see where each one sits, by line and column. Harder cases can switch to regular expression mode.

Frequently asked questions

Do I need to escape characters such as dot, asterisk or parenthesis?
Not in literal mode. Both markers are escaped before the search runs, so a marker like (value) or $ is looked up exactly as typed. Escaping only becomes your job in regular expression mode, where the two fields are used as raw patterns.
How do I keep only the first match per line?
Turn off the all-occurrences option to receive just the first chunk of the whole text. If what you want is one result per line, keep occurrences on and turn off the option that allows line breaks inside the chunk, so no match can ever span two lines.
What shows up when nothing matches?
The output stays empty and the counter reports that no occurrence was found. That usually points to a case difference between the marker and the text, a stray space inside the marker field, or a chunk that crosses lines while the multiline option is switched off.

Related Tools