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

Alteryx Designer Desktop Discussions

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

How to remove all date after multiple character

AshishAgarwal
7 - Meteor

Hi All,

 

I am trying to get all first group and would like to remove all data after different character.

 

Field1Required
Chandragupta_TczsfChandragupta
Saoj_ts\dfgfSaroj
Preeti_Tsf@dfdPreeti
Ashish_Ts.dffAshish
8 REPLIES 8
grazitti_sapna
17 - Castor

Hello @AshishAgarwal , you can use the text to column tool and under delimiter section pass _ to separate the data and get all the data before _ as a required output.

grazitti_sapna_0-1652930557140.png

I hope this helps!

Thanks!

 

Sapna Gupta
AshishAgarwal
7 - Meteor

Hi Sapna,

 

Thank you for input.

 

Small change in my excel which I missed to inform earlier

 

Field1Required
Chandragupta_TczsfChandragupta
Saoj_ts\dfgfSaroj
Preeti.Tsf@dfdPreeti
Ashish@Ts.dffAshish

 

Its not necessary that first charatcter will be "_".

 

Can you please help me on this.

 

I tried searching on community but not able to get any solution.

 

Regards,

Ashish

grazitti_sapna
17 - Castor

Hi @AshishAgarwal , try this 

 

([a-zA-Z0-9 ]+) and use option tokenize.

grazitti_sapna_0-1652932891433.png

 

Thanks!

 

Sapna Gupta
Qiu
21 - Polaris
21 - Polaris

@AshishAgarwal 
Can we say you only want the alphabets before any special characters?

0519-AshishAgarwal.PNG

AshishAgarwal
7 - Meteor

Hi Qiu,

 

I require number as well.

I missed to give example of number too.

 

Hi Sapna,

Your Logic has worked well for me.

 

Will check further till now.

 

Thank you so much.

 

Regards,

Ashish

grazitti_sapna
17 - Castor

@AshishAgarwal, if my post works for you kindly mark my post as a solution!

 

Thanks!

Sapna Gupta
binuacs
21 - Polaris

@AshishAgarwal Another option using the RegexReplace formula

binuacs_0-1652938042453.png

 

Qiu
21 - Polaris
21 - Polaris

@AshishAgarwal 
If that is the case, @binuacs solution should work. 😁

Labels
Top Solution Authors