Regex expression

:bullseye: What is your goal?

Hello everybody,
I would like export a data base from a crm. I connect, i have the date but …
I would like to create a json after an array agregator and i would like to replace bad caracters, or others expressions and i have this problem

:thinking: What is the problem & what have you tried?

The decription of article is :
{
“Libelle”:“Écran tactile LCD iiyama ProLite T2236MSC-B2 55,9 cm (22”)"

}

There is this expression (22") and Make have a problem

Could you help me to do the write the good regex expression ?

I try to resolve with Gemni but it doesn’t work

{{replace(replace(replace(replace(16.libelle; “/[\r\n\t]/g”; " “); “/””/g"; “"” ); “/ /g”; " "); “/&/g”; “&”)}}

Ce que fait cette formule (l’ordre est crucial) :

/[\r\n\t]/g → Remplace tous les sauts de ligne et tabulations par un espace. (Supprime ton erreur sur “remboursement.\n”).

“/”“/g” → Transforme les " en “. (Règle le problème de l’écran 22”).

/ /g → Nettoie les espaces insécables HTML.

/&/g → Remet les & au propre.

:clipboard: Error messages or input/output bundles

DataError
Source is not valid JSON.

Origin
Make

Thank you for your time and your help :slight_smile:

Hey there,

the replace function supports regex inside of it. So something like:

["\\\x00-\x1F]

could be used to match chars which can break a JSON.

It’ok for this.

Thank you.

but i want to keep the size of display “(22")).

Ant I consult a dev.

I ve just find the solution with a friend (dev). Make did an escape of escape and i just delete an \ :slight_smile:

{
“Libelle”:“{{replace(replace(16.libelle; “/[\r\n\t\x00-\x1F]/g”; space); “/([””\])/g"; “$1”)}}"
}

1 Like