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

Reg Ex use case

ahsansalik
8 - Asteroid

Hi I need help with the following, In the table i have input column and i have a pattern that all the values in the column have 4 letters than space and then the rest of alphanumeric pattern i want to use regex function to remove first 4 letters and space and have the remaining alpha numeric value in an output column. 

InputOutput
BDWS BM43:BBM43:B
ELTM EM01 EM01
ESPK ER09-2ER09-2
BAUL BL39:BBL39:B
ROOT RO24:DRO24:D
8 REPLIES 8
atcodedog05
22 - Nova
22 - Nova

Hi @ahsansalik 

 

Here is how you can do it. Replacing first 4 character & space to blank "" 

 

atcodedog05_0-1622132375075.png

 

Hope this helps 🙂

 

apathetichell
19 - Altair

2021-05-27 (1).png

regex_replace([input],"\w{4}\s(.*)","$1") should work. workflow to follow.

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @ahsansalik,

 

You could use the regex_replace() function to remove the characters, but the simpler approach might be just to use a text to column tool with a space as the delimiter? Both will yield the same result!

 

Jonathan-Sherman_0-1622132443026.png

 

I've attached my workflow for you to download if needed.

 

Kind regards,

Jonathan

 

ahsansalik
8 - Asteroid

Thanks Mate worked like a charm 🙂

ahsansalik
8 - Asteroid

Loved the approach to get to the solution thank you so much i tried this it also worked thanks a lot

mceleavey
17 - Castor
17 - Castor

Hi @ahsansalik ,

 

I thought I would have a go too 😄

 

mceleavey_1-1622132935457.png

^.*?\s

 

 

mceleavey_0-1622132914334.png

 

mceleavey_2-1622132950290.png

 

 

M.



Bulien

ahsansalik
8 - Asteroid

Loved the approach to get to the solution thank you so much i tried this it also worked thanks a lot

ahsansalik
8 - Asteroid

Jonathan never thought of that way :S it was so obvious staring me in the face 🙂 Thanks

Labels