Hi, How to use Replace Step to move '[['?

Hi, How to use Replace Step to move ‘[[’?

replace("[[test]]", "]]", "")

this is not working?

1 Like

Welcome to the Make community!

What do you mean by move? The replace function only replaces.

Can you provide an example input and output?

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Hi, thanks for reply. Sorry, I mean ‘remove’.

I try to change this string '[[test]]" into ‘test’, remove double brackets.

Using ‘replace’ function, replacing ‘[[’ is working, but replacing ‘]]’ is not working?

1 Like

Hello @bleedingsaber,
There are 2 ways.

Using nested replace() functions

{{replace(replace("[[test]]"; "]]"; emptystring); "[["; emptystring)}}

Note: If there are any specific variable is used as input, replace [[test]] with it.

Using Regular Expression

This create more complexity for you to handle expression as well as replace().
Try the first one if that’s not works then come up with your error.


:light_bulb:P.S.: Always search first, Check Make Academy. If this is helpful, Mark Best as Solutions :white_check_mark: and give :+1:
If you need expert help or have questions? Contact or comment below! :backhand_index_pointing_down:

1 Like

Welcome to the Make community!

To do this, you can use the built-in function replace — “Replaces the search string with the new string.”

{{ replace(text; regular_expression_pattern; replace_string) }}

e.g.:

{{ replace("[[test]]"; "/(\[\[|\]\])/g"; emptystring) }}

an example screenshot can be found in this similar question: How to extract file name with regex - #5 by samliew

For more information, the function’s documentation can be found in the Help Centre. You should also complete the tutorials in the Make Academy.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

1 Like




Hi, @samliew and @dilipborad , could you point out where I am doing wrong? Seems not working for me. Thanks for your kind help.

1 Like

You did not use the emptystring special variable. You cannot leave the third parameter blank.

3 Likes

Oh…You cracked it!

I thought just my ‘Make.com’ broken. :rofl:

1 Like