Your browser does not support SVGs
User Guide Useful Linx Send Feedback
User Guide Useful Links Send Feedback

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:

  • Enter a text that precedes or follows (or both) the desired character strings. Put backslash before special characters (.+*?|^$()[]{}\).
  • Enter a Javascript regular expression defining a character pattern that precedes or follows (or both) the desired character strings.
  • Directly define the text pattern to be searched for as a Javascript regular expression. If e. g. phone numbers are to be extracted this would be the expression \d{3}-\d{4} for U.S. phone numbers in the format XXX-XXXX.

The use and purpose of the Target Text Extractor is demonstrated in these examples: example 1, example 2

To perform other list operations (merging, subtracting, etc.), use this tool.

PRECEDED BY
or
TEXT TO EXTRACT
FOLLOWED BY
or

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.
Find only the first match in each line.
Find all matches in each line and separate them with in the output.
INPUT
?
Keep the break-after-character(s) Remove them.
This expression will be interpreted as regular expression. If you want special characters (.+*?|^$()[]{}\) be interpreted as normal characters, put backslash before them.
OUTPUT
separated by





twlink

info@molbiotools.com

© 2016-2017 Vladimír Čermák. All rights reserved.

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)