Awee

replace

Replace replaces all occurrences of a substring within the string value.

Replace replaces all occurrences of a substring within the string value.

Input

string

Parameters

#TypeRequired
0stringyes
1stringyes

Returns

string

Examples

Swap one word for another

Input

greeting = "Hello world"

Template

{{ greeting | replace:'world','everyone' }}

Output

Hello everyone

Redact a phrase

Input

text = "The password is hunter2"

Template

{{ text | replace:'hunter2','******' }}

Output

The password is ******

How is this guide?

On this page