We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

REGEX - Delete specific characters

Skyrone
7 - Meteor

Hello everyone,

 

After spending a few hours on the forum and Alteryx, I decided to ask for your help.

 

Here's a sample of the data that I have and that I'm trying to standardize.

 

Field_1
10;"abc";"def";A
20;"ab " c"";"def";B
30;"Abc"";"";C
40;"abc";"de ; f";D

 

Expected output is the following :

Field_1Field_2Field_3Field_4
10abcdefA
20abcdefB
30abcdefC
40abcdefD

 

But as you can see :

- On line 2 the 'c' is between double quotes

- On line 3 there's an extra double quotes in what must be the Field_2

- On line 4 there's a semicolon in what must be the Field_3

 

Because of line 4, I cannot ignore delimiters in double quotes.

So I started by a simple formula to ignore delimiters when possible :

Skyrone_0-1660732470031.png

Then I tried this REGEX but it deletes every quotes and I don't know how to say "delete only the double quotes that are in the middle of the Field :

Skyrone_1-1660732556299.png

Do you have any idea... ? 

It's the first time I use REGEX and I cannot find the right formula.

 

Thank you in advance,

Regards

 

2 REPLIES 2
binuacs
21 - Polaris

@Skyrone One way of doing this with the replace formula

 

ReplaceChar(Replace([Field_1],' ; ',''), '" ', '')

 

binuacs_1-1660734837340.png

 

 

Skyrone
7 - Meteor

Hi @binuacs,

 

Thank you, it seems to work in every cases ! I didn't know this formula ReplaceChar.

 

Cheers,

Labels
Top Solution Authors