Galaxy | Tool Preview

Replace Text (version 9.3+galaxy1)
Replacements
Replacement 0

What it does

This tool performs find & replace operation on a specified file.

The pattern to find uses the extended regular expression syntax (same as running 'sed -r').

TIP: If you need more complex patterns, use the sed tool.


Examples of Find Patterns

Examples of Replace Patterns


Example 1

Find Pattern: HELLO Replace Pattern: WORLD

Every time the word HELLO is found, it will be replaced with the word WORLD.


Example 2

Find Pattern: ^(.{4}) Replace Pattern: &\t

Find the first four characters in each line, and replace them with the same text, followed by a tab character. In practice - this will split the first line into two columns.


Extended Regular Expression Syntax

The select tool searches the data for lines containing or not containing a match to the given pattern. A Regular Expression is a pattern descibing a certain amount of text.

Note: SED uses extended regular expression syntax, not Perl syntax. \d, \w, \s etc. are not supported.