i want to replace 3 caracters in one string
=ARRAYFORMULA({REGEXREPLACE(A5,"c","a"); REGEXREPLACE(A5,"d","x");REGEXREPLACE(A5,"v","y")})
is possible? I want to add it to a query on future too :D ty alot
You can also use templated text and key-value replacements,
with either native functions or with a named-function.
| A | B | |
|---|---|---|
| 1 | Template Text => | 🔑1 was as tall as a 🔑2 🔑3 |
| 2 | Key-value pairs: | |
| 3 | 🔑1➜He | |
| 4 | 🔑2➜six-foot-three-inch | |
| 5 | 🔑3➜tree | |
| 6 | Formula : | Output: |
| 7 | =REDUCE(B1, A3:A5, LAMBDA(text, key_value, REGEXREPLACE(text, REGEXEXTRACT(key_value,"🔑\d+"), REGEXEXTRACT(key_value,"[^➜]+$")))) | He was as tall as a six-foot-three-inch tree |
As a named function:
TEMPLATE(template_text, key_value_pairs)