Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Regular express or Formula for select strings

AKPWZ
8 - Asteroid

Screenshot 2023-11-03 .png

Hi everyone,

Can someone please help how can I get this desired output marked in green.

Thank you

3 REPLIES 3
BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@AKPWZ hey. Personally, I would be drawn to filter the different types of rows, and parse them independently of one another as different data streams. I think you've got a decent amount of variation in the column. 

I've provided a solution just for the snippet of data you've given, hopefully it can serve as a starting point. I used two different regex tools to account for two of the different parsing variations you needed. Again, I think it'd be better to filter them out based on some logic i.e. contains brackets.

 

Screenshot 2023-11-03 094106.png

 

All the best,

BS

All the best,
BS

LinkedIN

Bulien
AKPWZ
8 - Asteroid

I think I got the solution.
if I us this expression : (\([^)]+\))(?=\1) then I will get the desire ouput. 
Thank you

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@AKPWZ I'm not quite sure that is true.

 

The regex you've provided is just looking for parsing one occurrence of a bracket,if a cell contains a bracket with information in.This doesn't account for your 5th row which contains a URL adjacent to the bracket sets - which you stated you wanted to parse out.

Use Regex101 to verify your Regex. Don't put sensitive data on there though. But you can see the expression doesn't match your stated expected output:
https://regex101.com/r/rQXT9m/1 

Screenshot 2023-11-03 101123.png

All the best,
BS

LinkedIN

Bulien
Labels