Can I use regex in the replace helper funcion?
# 🤖|ask-kapa
s
@microscopic-river-74022 Can I use regex in the replace helper funcion?
m
Please stand by @swift-island-27000 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- No, the
replace
helper function in Garden does not support regular expressions. It is used to replace all occurrences of a given substring in a string. The usage is
replace(string, substring, replacement)
. For example,
${replace("string_with_underscores", "_", "-")}
would replace all underscores with dashes, resulting in "string-with-underscores". You can find more information about the
replace
function and other helper functions in the Garden documentation (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted