{{tag>Function Function_List Text Version:v1.0}} ====== REPLACE_PATTERN2 ====== ===== Description ===== replaces all occurrences of the specified pattern in the text with a new pattern. ===== Syntax ===== ''REPLACE_PATTERN2 (text, old, new)'' ===== Parameters ===== attribute of Plain Text type or expression producing Plain Text, the pattern to be replaced and the pattern to replace with. ===== Returns ===== **Text**: the text with every occurrence of old replaced by new, matched as plain text (not a regular expression; use REPLACE_PATTERN for that) ===== Example ===== REPLACE_PATTERN2 ('John Smith', 'Smith', 'Black') returns ''%%'%%John Black%%'%%'' ===== Related ===== [[ref:a_f:f:af:replace_pattern|REPLACE_PATTERN]], [[ref:a_f:f:af:matches|MATCHES]], [[ref:a_f:f:af:index_of|INDEX_OF]]