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.

How to remove the lead special characters

npd
5 - Atom

I have a problem in which i have to clean the data to remove the leading special characters

 

 Input                                  output

_5abc_%agdj                      5abc_%agdj 

//rsf_@qtr_                          rsf_@qtr

 

Thanks for your help

5 REPLIES 5
Luke_C
17 - Castor
17 - Castor

Hi @npd 


Try this:

REGEX_Replace([Field1], '[^A-Za-z0-9]+(\w.*)', '$1')

Luke_C_0-1648673304849.png

 

 

npd
5 - Atom

Hello @LUKE_C I tried this it is not providing the exact result if there is a single special character or if there is a space and special character one after the other example A & B it is giving output as AB but it should clean only the starting special characters

Luke_C
17 - Castor
17 - Castor

Hi @npd  - please provide a more representative dataset 

npd
5 - Atom

Please find the sample data that i have:

 

_.ab. &q23

/bgj_try
%abd_23
− CAM FIELD
:
CODE & TEST

binuacs
21 - Polaris

@npd 

binuacs_0-1648678816343.png

 

Labels
Top Solution Authors