Alteryx Designer Desktop Discussions

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

Data Extraction using RegEx

RajatRehria
8 - Asteroid

Hi guys, i want to extract everything after first hyphen. Please help getting this done using RegEx or RegEx formula

 

Data:

1004261 - Prepaid Expenses - Operating

 

Required output:

1004261Prepaid Expenses - Operating
2 REPLIES 2
Prometheus
12 - Quasar

@RajatRehria You can use the Text to Columns tool and use the "-" as a delimiter, while creating only two columns. I used the Multi-Field Formula tool to trim the trailing spaces, but you can use it or the Data Cleanse tool to accomplish the same thing.

TTC1.PNG

Trim.PNG

FinnCharlton
13 - Pulsar

@RajatRehria Here's how to do it with RegEx:

 

image.png

 

We use the Parse function of the RegEx tool. Each group in brackets is parsed to a separate column.

Labels