comparison find_and_replace.xml @ 6:8928e6d1e7ba draft

Uploaded
author bgruening
date Thu, 08 Jan 2015 09:07:31 -0500
parents 56e80527c482
children d64eace4f9f3
comparison
equal deleted inserted replaced
5:3f0e0d4c15a9 6:8928e6d1e7ba
26 <valid initial="string.printable"> 26 <valid initial="string.printable">
27 <remove value="&apos;"/> 27 <remove value="&apos;"/>
28 </valid> 28 </valid>
29 </sanitizer> 29 </sanitizer>
30 </param> 30 </param>
31 <param name="replace_pattern" type="text" size="20" label="Replace with" help="Use simple text, or $&amp; (dollar-ampersand) and $1 $2 $3 to refer to matched text. See examples below." > 31 <param name="replace_pattern" type="text" size="20" label="Replace with"
32 help="Use simple text, or $&amp; (dollar-ampersand) and $1 $2 $3 to refer to matched text. See examples below." >
32 <sanitizer> 33 <sanitizer>
33 <valid initial="string.printable"> 34 <valid initial="string.printable">
34 <remove value="&apos;"/> 35 <remove value="&apos;"/>
35 </valid> 36 </valid>
36 </sanitizer> 37 </sanitizer>
37 </param> 38 </param>
38
39 <param name="is_regex" type="boolean" checked="false" truevalue="-r" falsevalue="" 39 <param name="is_regex" type="boolean" checked="false" truevalue="-r" falsevalue=""
40 label="Find-Pattern is a regular expression" help="see help section for details." /> 40 label="Find-Pattern is a regular expression" help="see help section for details." />
41 41
42 <param name="caseinsensitive" type="boolean" checked="false" truevalue="-i" falsevalue="" 42 <param name="caseinsensitive" type="boolean" checked="false" truevalue="-i" falsevalue=""
43 label="Case-Insensitive search" help="" /> 43 label="Case-Insensitive search" help="" />
58 <param name="column" label="in column" type="data_column" data_ref="infile" accept_default="true" /> 58 <param name="column" label="in column" type="data_column" data_ref="infile" accept_default="true" />
59 </when> 59 </when>
60 </conditional> 60 </conditional>
61 </inputs> 61 </inputs>
62 <outputs> 62 <outputs>
63 <data format="input" name="outfile" metadata_source="infile" /> 63 <data format_source="infile" name="outfile" metadata_source="infile" />
64 </outputs> 64 </outputs>
65 <tests> 65 <tests>
66 <test> 66 <test>
67 <param name="infile" value="find_and_replace1.txt" /> 67 <param name="infile" value="find_and_replace1.txt" />
68 <param name="find_pattern" value="day" /> 68 <param name="find_pattern" value="day" />
114 114
115 115
116 **Examples of Replace Patterns** 116 **Examples of Replace Patterns**
117 117
118 - **WORLD** The word 'WORLD' will be placed whereever the find pattern was found. 118 - **WORLD** The word 'WORLD' will be placed whereever the find pattern was found.
119 - **FOO-$&-BAR** Each time the find pattern is found, it will be surrounded with 'FOO-' at the begining and '-BAR' at the end. **$&amp;** (dollar-ampersand) represents the matched find pattern. 119 - **FOO-$&-BAR** Each time the find pattern is found, it will be surrounded with 'FOO-' at the begining and '-BAR' at the end. **$&** (dollar-ampersand) represents the matched find pattern.
120 - **$1** The text which matched the first parenthesis in the Find Pattern. 120 - **$1** The text which matched the first parenthesis in the Find Pattern.
121 121
122 122
123 ----- 123 -----
124 124