Often the part of a text you want is fenced in by the same pair of markers every time. The values in square brackets. The words in quotation marks. The text inside <b> and </b>. The value that follows “Name:” and ends at the end of the line. This tool finds every stretch between a start marker and an end marker and lists them one per line.
Enter the text, then fill in “Starts with” and “Ends with”.
Examples
With the text Name: [Ada] Role: [Engineer], a start of [ and an end of ] gives:
Ada
Engineer
A start of <b> and an end of </b> pulls out bold text from HTML. A start of " and an end of " extracts quoted phrases. For lines like Name: Ada, set the start to Name: and the end to \n, and you get every value that follows the label, up to the end of its line.
The \n stands for a line break and \t for a tab, so you can use them as markers.
How the search works
The tool looks for the first start marker, then the first end marker after it, takes what lies between, and carries on from where the end marker finished. Matching ignores upper and lower case unless you untick that option.
That has consequences for nested markers. In [a [b] c], the first [ starts a match and the first ] ends it, so you get a [b. The tool does not count levels of nesting. If your text nests, run it in stages, working from the inside out.
A start marker without a matching end marker after it is skipped. The end marker is looked for only after the start, so a stray ] before the first [ is ignored.
Options
“Keep the delimiters” includes the markers in each result, which is handy when you want to collect whole tags or whole bracketed items. “Remove repeats” lists each distinct result once. The summary shows how many were found and how many are listed after filtering.
When something simpler will do
If the markers are the same on every line and the structure is regular, the text splitter may be quicker, since it cuts lines at a separator. To keep or remove whole lines containing a word, use filter lines. To replace the content between markers rather than pull it out, a regular expression in find and replace will do it, for instance \[.*?\]. And if the text between your markers is HTML, remove HTML tags strips all of it at once.