Target Text Extractor (Advanced)

Input Text

Break Line After Each

Output Text

Remove Duplicate Lines
Sort
Reverse
Shuffle
Select All
Save to File
Join All in One Line
separated by

Settings

MODE: Simple Advanced

PRECEDED BY

Auto-escape special characters.

or

Optional

TEXT TO EXTRACT

FOLLOWED BY

Auto-escape special characters.

or

Optional

Perform a case-sensitive search.


Include search patterns in the output.


Output with line numbers.


Don't report negative lines.


Output whole negative lines instead of matches.


In case of an ambiguous match do:

Greedy matching (longest possible).


Lazy matching (shortest possible).

In case there are more matches in a line:

Find only the first match in the line.


Find all matches in the line and separate them with in the output.

Search

TARGET TEXT EXTRACTOR

This tool scans the provided input for a pre-defined character pattern, line by line, and outputs the matches (or whole positive or negative lines).

Text patterns can be defined in following ways:

Close

REGULAR EXPRESSIONS

Metacharacters

Metacharacters are characters with a special meaning:

. Find a single character, except newline or line terminator
\w Find a word character (a letter, a digit or an underscore)
\W Find a non-word character
\d Find a digit
\D Find a non-digit character
\s Find a whitespace character
\S Find a non-whitespace character
\b Find a match at the beginning/end of a word
\B Find a match not at the beginning/end of a word
\t Find a tab character

Brackets

Brackets are used to find a range of characters:

[abc] Find any character between the brackets
[^abc] Find any character NOT between the brackets
[0-4] Find any digit between the brackets
[^3-6] Find any digit NOT between the brackets
(x|y) Find any of the alternatives specified

Quantifiers

n+ Matches any string that contains one or more n
n* Matches any string that contains zero or more n's
n? Matches any string that contains zero or one n
n{X} Matches any string that contains a sequence of X n's
n{X,Y} Matches any string that contains a sequence of X to Y n's
n{X,} Matches any string that contains a sequence of at least X n's
n$ Matches any string with n at the end of it
^n Matches any string with n at the beginning of it
n(?=x) Matches any string n that is followed by a specific string x
n(?!x) Matches any string n that is not followed by a specific string x
n+?, n*?, n?? Lazy match (shortest possible) instead of the default greedy match (longest possible)
Close

SIMPLE AND ADVANCED MODE

In "simple mode", any text entered in the text pattern definition fields (PRECEDED BY and FOLOWED BY) will be searched for "as is". In advanced mode, the text patterns will be interpreted as regular expressions so it is intended for users who are familiar with them.

Close

TEXT TO EXTRACT

An extraction pattern not found among the drop-down menu options has to be provided by the user (after selection of one of the last two options). The pattern can be composed of normal characters and reserved characters with a special meaning (.+*?|^$()[]{}\). To avoid mistaken interpretation of normal characters as special characters, use a preceding backslash character, e.g. "\." to mark a dot that should be interpreted as dot and not as "any character", which is the meaning of the special character "." (dot). To display an overview of special characters click the "Regex Syntax" button.

Close