Galaxy | Tool Preview

Replace (version 9.3+galaxy1)
Find and Replaces
Find and Replace 0

What it does

This tool finds $ replaces text in an input dataset.

The pattern to find can be a simple text string, or a perl regular expression string (depending on pattern is a regex check-box).

When using regular expressions, the replace pattern can contain back-references ( e.g. \1 )

This tool uses Perl regular expression syntax.


Examples of *regular-expression* Find Patterns

Examples of Replace Patterns


Example 1

Find Pattern: HELLO Replace Pattern: WORLD Regular Expression: no Replace what: entire line

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


Example 2

Find Pattern: ^chr Replace Pattern: (empty) Regular Expression: yes Replace what: column 11

If column 11 (of every line) begins with ther letters 'chr', they will be removed. Effectively, it'll turn "chr4" into "4" and "chrXHet" into "XHet"


Perl's Regular Expression Syntax

The Find & Replace 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.