Difference between revisions of "Pattern Replacement"
(Created page with "Pattern Replacement Pattern Replacement takes place in a 2nd parameter after a Pattern Matching parameter, for example in the Rename CHOP. It builds up the new names t...")
Revision as of 18:42, 22 March 2019
Pattern Replacement Pattern Replacement takes place in a 2nd parameter after a Pattern Matching parameter, for example in the Rename CHOP. It builds up the new names to replace the matched names using both the features of Pattern Expansion, as well as extra syntax specific to Pattern Replacement. The extra syntax allows for pulling out wildcards matched during the Pattern Matching.
The synxtax is either a * or a ?, followed by (<matchedIndex>).
For example if a CHOP has 3 channels named
left_side_monitor right_side_projector top_side_led.
And the Rename from has
as it's entry. You can pull out what was matched before the first _ and after the last _ using *(0) and *(1).
A pattern expansion of
Will result in the channel names
monitor_floor_left projector_floor_right led_floor_top
Pattern Replacement occurs in:
Used in conjunction with Pattern Matching to replace all or portions of matched strings with new data. Used in places such as the Rename CHOP.