{{tag>Function Function_List Text}} ====== REPLACE_PATTERN ====== ===== Description ===== Returns the text being the replacement of all occurrences of the old pattern in the provided text with the new pattern ===== Syntax ===== ''REPLACE_PATTERN (text, old, new)'' Can be used in the condition of a [[:ref:a_f:a:find|FIND]] action. ===== Parameters ===== Attribute of the Plain Text type or string constant or calculation producing text; a regular expression identifying the old pattern and the text indicating the new pattern. ===== Returns ===== **Text**: the text with every match of old replaced by new; old is a regular expression (use REPLACE_PATTERN2 for plain text) ===== Example ===== IF REPLACE_PATTERN (Account.Name, 'ohn', 'ack') = 'Jack Smith' THEN ... ===== Related ===== [[ref:a_f:f:af:replace_pattern2|REPLACE_PATTERN2]], [[ref:a_f:f:af:matches|MATCHES]], [[ref:a_f:f:af:index_of|INDEX_OF]]