Alteryx Designer Desktop Discussions

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

Find and Replace text within quotations

lipster26
7 - Meteor

I have a string:

<IncomeLossUSPartnerships referenceDocumentId="PartnerIntM30004RIC1">

 

I'd like to delete the text within the quotations:

 

<IncomeLossUSPartnerships referenceDocumentId="">

 

What would be the best way to do this?

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@lipster26 I would use regex in a formula tool:

Regex_replace([Field1],'".*"','""')
BenMoss
ACE Emeritus
ACE Emeritus

There’s quite a few ways to achieve this, personally, I would go the RegEx route as use a statement like...

 

RegEx_replace([Field],’”\w+”’,’””’)


which means replace any instance of alphanumeric characters contained within double quotes with double quotes.

 

Another way would be to use a text to columns tool, splitting on the double quotes character and then reconstructing your string after with a formula tool, which may be easier for someone looking at your workflow to consume.

 

Ben

Tyro_abc
11 - Bolide

Hi @lipster26 

Try this ....

Tyro_abc_0-1616012924850.png

Tyro_abc_1-1616012948321.png

 

Best Regards

Arundhuti

Labels