Alteryx Designer Desktop Discussions

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

How can I separate the amount from the text using regex?

RichardAlt
8 - Asteroid

Hello guys,

 

I'm quite new using regex in alteryx and I don't know what combinations of regex should I use.

 

This is my sample data, I need to separate this from text and the amount

NONPAR FOREIGN(OFFSHORE)
NONPAR FOREIGN(OFFSHORE) 3,123.00 15,123.57 6,123.57 43,123.83
NONPAR LOCAL(ONSHORE)
NONPAR LOCAL(ONSHORE) 144,123.23 404,123.09 511,123.87 1,123,225.48
PAR 5
PAR 5 3,123,865.74 15,123,000.83 13,123,107.99 19,123,805.31
PAR AFTER 2005
PAR AFTER 2005 .00 .00 .00 4,123,123.85
PAR BEFORE 2005
PAR BEFORE 2005 .00 .00 .00 1,123,861.12
PAR JH
PAR JH .00 .00 .00 123,542.83
TotalOutstanding: 3,631,123.97 15,123,411.49 14,123,962.43 26,406,123.32

 

My desired output is something like this. Disregard the strike.

NONPAR FOREIGN(OFFSHORE)

    

NONPAR FOREIGN(OFFSHORE)

3,123.00

15,123.57

6,123.57

43,123.83

NONPAR LOCAL(ONSHORE)

    

NONPAR LOCAL(ONSHORE)

144,123.23

404,123.09

511,123.87

1,123,225.48

PAR 5

    

PAR 5

3,123,865.74

15,123,000.83

13,123,107.99

19,123,805.31

PAR AFTER 2005

    

PAR AFTER 2005

0

0

0

4,123,123.85

PAR BEFORE 2005

    

PAR BEFORE 2005

0

0

0

1,123,861.02

PAR JH

    

PAR JH

0

0

0

123,542.83

TotalOutstanding:

3,631,123.97

15,123,411.49

14,123,962.43

26,406,123.32

 

This is my output and workflow used.

 
 
 
 
 
 

RichardAlt_0-1590546010086.png

 

I've attached my sample workflow and source file please help.

2 REPLIES 2
fmvizcaino
17 - Castor
17 - Castor

Hi @RichardAlt ,

 

I'm using two regex tools to accomplish the desired result. 1st to separate the text and the other to dynamically separate the numbers.

 

fmvizcaino_0-1590546802888.png

 

 

Best,

Fernando Vizcaino

RichardAlt
8 - Asteroid

@fmvizcaino  Thank you! It's working.

Labels