Awee

replace_pattern

ReplacePattern replaces all regex matches within the string value.

ReplacePattern replaces all regex matches within the string value. Supports capture group references (e.g. $1) in the replacement string.

Input

string

Parameters

#TypeRequired
0stringyes
1stringyes

Returns

string

Examples

{{ text | replace_pattern:'\s+','' }}
{{ slug | replace_pattern:'[^a-z0-9\-]','' }}

How is this guide?

On this page