Alteryx Designer Desktop Discussions

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

Regex tool

Wynn
8 - Asteroid

Capture.JPG

Could anyone help me explain the expression highlighted above? I'm trying to understand what this expression means and how to build it from scratch. I know that the expression helped extract out the string after the last comma. However, i was not able wrap my mind around how to understand every single dot and the (). Is there a good source for me to learn how to write this expression by myself as I found Regex is pretty helpful? Thanks in advance.

2 REPLIES 2
afv2688
16 - Nebula
16 - Nebula

Hello @Wynn ,

 

The dot means any sigle character, in other words, doesn't matter what it is, special character, space, lettter etc. The wild card associated indicates the amount (zero or more characters). Another example would be the plus symbol "+" which indicates 'one or more'.

 

The parenthesis are key characters that indicate a group.

 

So what you are looking there is for the last group of characters after the last comma (it is always by default the last).

 

You wan to parse it ant take it.

 

I would recommend you checking this:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

Read it and practice, a lot!

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Wynn,

 

So a great place to start learning Regex would be https://regexone.com/

 

For your expression .*,(.*)

 

Parenthesis (brackets) will "extract" or "parse" out the piece of text that matches your expression which is why you've created a new column. The first part .*. is saying look at anything up until the last comma (as the .* is what we would call greedy). Therefore your expression is parsing out everything after the last comma

 

If this solves your issue please mark the answer as correct, if not let me know!

 

Regards,

Jonathan

Labels