How to replace +44 in string?

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.

1 Like

Hi @DWF

We could try replacing like this:

2 Likes

Just copy that same which is given by @Shornalatha.

{{replace(190.text; "/\+44/"; emptystring)}}

Change the variable at 190.text if needed.
:+1:

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?

1 Like

That’s just a regular expression pattern.

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.

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.

Hello @DWF,
:white_check_mark: Please remember to mark the most helpful replies to your questions as solutions. It helps keep the community organised.
:+1: