# HG changeset patch # User galaxyp # Date 1484843161 18000 # Node ID bf0c0905fd604597af11d6b20c7be66a2bf7e9a0 # Parent 002f95cf9d6e9876ad8358bd9af52107e82f82b1 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4 diff -r 002f95cf9d6e -r bf0c0905fd60 regex.xml --- a/regex.xml Wed Jan 18 17:45:06 2017 -0500 +++ b/regex.xml Thu Jan 19 11:26:01 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 002f95cf9d6e -r bf0c0905fd60 regex_tabular.xml --- a/regex_tabular.xml Wed Jan 18 17:45:06 2017 -0500 +++ b/regex_tabular.xml Thu Jan 19 11:26:01 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