Apr 27, 2021 06:00 AM
Dear community,
first of all I really appreciate this forum, even if just as a silent participant so far. I’m pulling my hair out trying to replace strings in variables to make them ready for webmerge/formstack documents.
Input string: my webmerge variable
Wanted result: {$my_webmerge_variable}
Formula I am using: REGEX_REPLACE(REGEX_REPLACE({regex test},"\A","{$"), “\s”, “_”)
Result I am getting: {$my_webmerge_variable
How do I get the closing brace = } at the end of the variable? I tried $ and \z but they don’t seem to be working. Thank you all in advance, any help is much appreciated :slightly_smiling_face:
Solved! Go to Solution.
Apr 27, 2021 07:32 AM
Welcome to the community, @FrankLovesAirtable!
I’m not a REGEX expert, but are you just looking to add brackets & replace the spaces with underscores?
If so, you could just do it simply like this:
"{$" & SUBSTITUTE(Input," ","_") & "}"
Apr 27, 2021 07:32 AM
Welcome to the community, @FrankLovesAirtable!
I’m not a REGEX expert, but are you just looking to add brackets & replace the spaces with underscores?
If so, you could just do it simply like this:
"{$" & SUBSTITUTE(Input," ","_") & "}"
Apr 28, 2021 01:58 AM
Dear @ScottWorld,
you help is very much appreciated and your solution works perfectly well. This function also seems to be more of the standard repertoire from Airtable so to speak, using this one from now one. Tagged as Solution. Thank you.