extract text between words

regex extract tool

text pattern searching

regex online tool

Your browser does not support SVGs

Target Text Extractor

molbiotools.com

useful linx send feedback user guide
Useful links Send feedback! User guide

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

PRECEDED BY

or

Optional

TEXT TO EXTRACT

FOLLOWED BY

or

Optional

Perform a case-sensitive search.


Don't report negative lines.


Output with line numbers.


Include search patterns in the output.


Output whole negative lines instead of matches.


Lazy match (shortest possible).


Greedy match (longest possible).

Find only the first match in each line.


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

Search

Your browser does not support SVGs


DISCLAIMER: This free software comes without any warranty. The author of the software bears no responsibility for any loss or damage that may arise from its use for any purpose.

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 Matches any string that is followed by a specific string n
?!n Matches any string that is not followed by a specific string n
n+?, n*?, n?? Lazy match (shortest possible) instead of the default greedy match (longest possible)
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