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.
SOLVED

Regex Question 3

Gamaliel
10 - Fireball

Hello,

 

Can I seek help regarding this regex. Please see attached workflow.

 

Input:

 

Gamaliel_1-1628557848135.png

 

 

Desired Output:

 

Gamaliel_0-1628557831371.png

 

 

 

I already prepared a workflow with a regex with the account description removes "401".

 

Thanks.

11 REPLIES 11
AkimasaKajitani
17 - Castor
17 - Castor

Hi @Gamaliel 

 

I made the workflow using 2 RegEx tools.

 

1st RegEx tool only take the numeric value that is at beginning of line. This makes the Account Code Field.

 

AkimasaKajitani_0-1628559997466.png

 

The result is as follows.

 

AkimasaKajitani_2-1628560315861.png

 

Next one erases numeric value and " · " by using Replace method option.

 

AkimasaKajitani_1-1628560105058.png

 

The result is as follows.

 

AkimasaKajitani_3-1628560361976.png

 

Please check the attached workflow.

 

Gamaliel
10 - Fireball

@AkimasaKajitani  Hello, I made a revision in my regex input to show all of the formats that need to be parsed. See revised workflow.

 

Input:

Gamaliel_1-1628564828102.png

 

 

Desired Output:

Gamaliel_0-1628565037089.png

 

 

 

atcodedog05
22 - Nova
22 - Nova

Hi @Gamaliel 

 

Updated the previous workflow. If account doesn't start with number add pipe "|" before that its not parsed into column 1. Logic similar to exception case.

 

atcodedog05_0-1628575335371.png

 

Hope this helps : )

Gamaliel
10 - Fireball

@atcodedog05 thanks. Can I ask your workflow on this?

 

 

atcodedog05
22 - Nova
22 - Nova

@Gamaliel Oops sorry i forgot 😅 have updated my above post with workflow.

Gamaliel
10 - Fireball

@atcodedog05  hello, by the way, i want to bring your attention to this desired output here:

 

Gamaliel_0-1628576633458.png

 using the previous workflow, it will eliminate "401" and will just leave "k". What we want is to retain the whole word 401k. You can refer to the updated workflow I attached herewith. Thanks.

atcodedog05
22 - Nova
22 - Nova

Hi @Gamaliel 

 

Your workflow seems to be different please use this workflow.

Gamaliel
10 - Fireball

@atcodedog05  yes I tried to use this one but I noted that there is still "Total 1045 · Schwab 401k Account". It should be presented as Total Schwab 401k Account without "1045 · ". For now, I do not know of a way yet to carve this out.

 

Thanks.

 

Gamaliel_0-1628577778878.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @Gamaliel 

 

Got it. Try this

 

atcodedog05_0-1628578098551.png

 

Hope this helps : )

 

Labels