I am trying to get rid of +44 prefix in a text that contains a phone number and I don’t seem to be able to do so and am not sure why. Can anyone help with this? The function below also gets rid of blank spaces:
{{replace(replace(2.phone_number; space; emptystring); “”“+44"”"; emptystring)}}
I think it might be because I’ve got quote marks around my +44 but if I don’t, Make just removes the + in the expression when I save it.
Thank you both very much for answering. I’d previously tried to find out details for the syntax used in Make. Is there anywhere where I can find the details for this? A syntax document or explanation of the meaning of the various symbols used in Make?
For more information about the replace function, see the String functions page in the Make Help Centre, which covers:
replace (text; search string; replacement string)
For more information about regular expression patterns, see the Text Parser page in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression, which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
For experimenting with regular expressions, we recommend the regular expressions 101 website. Just make sure to select the ECMAScript (JavaScript) flavour in the left panel.
Hope this helps! Let me know if there are any further questions or issues.