Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Parse string field - multiple columns with text and digits

AdenJAlt
5 - Atom

Hi 

 

I would like to parse a string field obtained from transaction statement into various components. For example the following string: "Bought Woolworths Holdings Limited 14.9276 @ 6,699.00 With Price Limit <= 6,700.00"

 

Output should give me the following additional fields:

1) Stock

2) Number of shares

3) Price per a unit

 

DateDescriptionValueStockNumber of sharesPrice per unit
2022/11/18Bought Woolworths Holdings Limited 14.9276 @ 6,699.00 With Price Limit <= 6,700.00-1000Woolworths Holdings Limited14.92766,699.00

 

4 REPLIES 4
Kakuffo
Alteryx
Alteryx

hi @AdenJAlt  this is a perfect job for the regex tool.

ShankerV
17 - Castor

Hi @AdenJAlt 

 

Will all the inputs for huge data set will follow the same format?

 

Many thanks

Shanker V

AdenJAlt
5 - Atom

Yes, the data set would just be "Bought" transactions. The data set includes the following fields:

 

DateDescription

Value

 

The syntax of Description field will consistently follow as: "Bought [Stock xx] [Units bought xx] @ [Price]". There is often additional text after the price if a specific buy instruction was included, however I am not too interested in that.

 

 

binuacs
20 - Arcturus

@AdenJAlt One way of doing this

 

binuacs_0-1669041354129.png

 

Labels