Remove [" an "] from a frase using regex

What are you trying to achieve?

I’m using Make with Pipefy and Google Sheets to fill some coluns with information from a survey.

Im current receivng de person nome like this: [“Priscila Cardoso da Silva”], I want to remove [" and "] from de beggin and the end of the persons name.

Steps taken so far

I’m using the Replace function with the regex ["(.*?)"] and repleacing to a emptystring but is not working.

Screenshots: scenario setup, module configuration, errors

Captura de tela 2024-07-02 134701.jpg

I would get rid of regrex if you always have the same format of the names.

I did this and it worked well:

function here: {{replace(replace(22.name; “[”“”; emptystring); “”“]”; emptystring)}}

3 Likes

You are a life saver, work perfect! Thanks!

3 Likes

Can your mark as solution please thank you!!! :slight_smile:

2 Likes

Welcome to the Make community!

You had the right idea, but what you needed to do is to use an “OR” to match both opening and closing brackets.

Example: https://regex101.com/r/waBQ78/1

Screenshot_2024-07-03_100702

Then, in your replace function, you need to begin and end with the regular expression delimiter /

and then finish off with a g - to indicate that you want to remove more than one match (both opening and closing brackets)

i.e.:

/(\["|"\])/g

For more information, see Text Parser 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 (aka regex or regexp), 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!

samliewrequest private consultation

Join the Make Fans Discord server to chat with other makers!

2 Likes