replace_first


Replaces the first occurrence of the string value found within the parameter with the replacement value


Syntax


{{ <Parameter> | replace_first: <Search>, <Replacement> }}



Arguments

Parameter - A string literal or name of the input parameter that will be searched through


Search - The first occurrence of the supplied string literal will be replaced from the parameter


Replacement - The value that will be inserted within the parameter in place of the first occurrence.


Example 1:

InputParameter Value


'The following information has been REDACTED from view by the REDACTED'



Input


{{ InputParameter | replace_first: 'REDACTED', 'censored'}}



Output


'The following information has been censored from view by the REDACTED'