In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Amend formula

chiragpatel_1
8 - Asteroid

Hi ,

 

I  have the below formula, I want to amend part of it, so that it picks out letters before the first number. How would i do that?

 

IF REGEX_Match([Outcode], '\d+') THEN [Outcode]
ELSE REGEX_Replace([Outcode], '\d', '')
ENDIF

 

thank you

3 REPLIES 3
binu_acs
21 - Polaris

@chiragpatel_1 @Can you provide a sample data and explain what you are trying to achieve? 

chiragpatel_1
8 - Asteroid

for example there is a cell in outcode column which is CH639HP, currently that is being outputed as CHHP , i wan the formula to only output CH



 

 

binu_acs
21 - Polaris

@chiragpatel_1 

 

IF REGEX_Match([Outcode], '^\D.+') THEN
 REGEX_Replace([Outcode], '(.\D+)\d.*', '$1')

ELSE

[Outcode]
ENDIF

image.png

Labels
Top Solution Authors