Multiple replace?

Hi guys

Is it possible to do multiple replace in 1 line?

{{ $nummers_nr := replace .Params.url "maddie-and-tae" "maddie-tae" }}

How can I add also replace “big-and-rich” with “big-rich” ?

no.

There is a function called dict, so there might be a way to work with a loop and a dict, but not a one liner.

1 Like

i figured it out already how to do it in 1 line hehe

Then post your solution so everyone can learn something new :slight_smile:

2 Likes

{{ $nummers_nr := replace ( replace .Params.url "big-and-rich" "big-rich" ) "maddie-and-tae" "maddie-tae" }}

:slight_smile:

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.