# HG changeset patch # User galaxyp # Date 1484843175 18000 # Node ID 209b7c5ee9d75c4601940c92d19e529bc692b41e # Parent 60d04307b027f35670061b103e4bb59b9d9d61cf planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4 diff -r 60d04307b027 -r 209b7c5ee9d7 regex.xml --- a/regex.xml Wed Jan 18 17:45:20 2017 -0500 +++ b/regex.xml Thu Jan 19 11:26:15 2017 -0500 @@ -110,21 +110,24 @@ In the replacement pattern, use the special token #{input_name} to insert the input dataset's display name. The name can be modified by a second find/replace check. Suppose you want to insert the sample id of your dataset, named **Sample ABC123**, into the dataset itself, which currently contains the lines:: -Data 1 -Data 2 -Data 3 + + Data 1 + Data 2 + Data 3 You can use the following checks:: -Find Regex: Data -Replacement: #{input_name} Data -Find Regex: Sample (\S+) -Replacement: \1 + Find Regex: Data + Replacement: #{input_name} Data + + Find Regex: Sample (\S+) + Replacement: \1 The result will be:: -ABC123 Data 1 -ABC123 Data 2 -ABC123 Data 3 + + ABC123 Data 1 + ABC123 Data 2 + ABC123 Data 3 diff -r 60d04307b027 -r 209b7c5ee9d7 regex_tabular.xml --- a/regex_tabular.xml Wed Jan 18 17:45:20 2017 -0500 +++ b/regex_tabular.xml Thu Jan 19 11:26:15 2017 -0500 @@ -112,21 +112,24 @@ In the replacement pattern, use the special token #{input_name} to insert the input dataset's display name. The name can be modified by a second find/replace check. Suppose you want to insert the sample id of your dataset, named **Sample ABC123**, into the dataset itself, which currently contains the lines:: -Data 1 -Data 2 -Data 3 + + Data 1 + Data 2 + Data 3 You can use the following checks:: -Find Regex: Data -Replacement: #{input_name} Data -Find Regex: Sample (\S+) -Replacement: \1 + Find Regex: Data + Replacement: #{input_name} Data + + Find Regex: Sample (\S+) + Replacement: \1 The result will be:: -ABC123 Data 1 -ABC123 Data 2 -ABC123 Data 3 + + ABC123 Data 1 + ABC123 Data 2 + ABC123 Data 3