Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Extract specific data from a string

hash_89
8 - Asteroid

Hi,

 

I have a column in my dataset that has something like this. Length of the string differs from row to row and so does the position of the one that i'm looking for.

 

¥12671;B7002¥12672;2023-03-14¥12674;15¥12675=44082¥12836;084132000¥11527;315¥12849;2023-01-19¥13194=62598¥13555

 

I want to find the values after ¥11527; but before the next ¥

 

My end result should be 315.

 

Can someone help please?

3 REPLIES 3
geraldo
13 - Pulsar

@hash_89 

Substring([field],FindString([field],'¥11527') + 7,FindString(Substring([field],FindString([field],'¥11527') +7),'¥'))

alisonpitt
11 - Bolide

I would actually do this with regex: parse the string using the regex ¥11527;(.*?)¥. That captures everything after ¥11527; and before the next ¥. Please see attached for how I set up the regex tool.

alisonpitt_0-1685664618853.png

 

acarter881
12 - Quasar

Hello, @hash_89.

 

I believe this RegEx will work for you: ¥11527;(.*?)(?=¥)

 

Please see the screenshot below for details. Essentially, we find what is right after ¥11527; and ensure it is followed by a ¥.

acarter881_0-1685664839099.png

 

 

Labels
Top Solution Authors