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

trying to strip out a certain string from various length of string

AA007
8 - Asteroid

Contains(Right([field], 3),'Iii' or 'Vii') 

7 REPLIES 7
Bahouth12
7 - Meteor

Hi,

 

I am not sure but try to use REGEX_Replace function in the formula tool.

 

REGEX_Replace([Field], '[^Iii|^Vii]', '')

 

Thanks

AA007
8 - Asteroid

the passed checking variable is not limited to just two conditions

[length of last word] = 3 && Contains(Right([field], 3),'Iii' or 'Vii') ||
[length of last word] = 2 && Contains(Right([field], 2), 'Ii' or 'Iv' or 'Vi' or 'Ix' )||
[length of last word] = 1 && Contains(Right([field], 1),'I' or 'V' or 'X')

Bahouth12
7 - Meteor

Hi,

Share sample data will make it easier for the Community to assist you.

Thanks 

AA007
8 - Asteroid

App Developer I
App Developer II

Senior Marketing Officer and Controller
Account I
Account II
Account III
Accounting Services IV
Principal and title Ix

Bahouth12
7 - Meteor

Hi,

take a look at the attached workflow. let us know if that works fine with you.

Thanks

AA007
8 - Asteroid

my aim is to strip the final denominations and group them together i have tried multiple regexes but failed where if I have some thing like vice principal and accounting v  i would end up with ice principal and accounting v

Bahouth12
7 - Meteor

Hi @AA007,

I changed the solution logic by adding te Find Replace Tool. This will let you list any string that you want to strip out from string. Take a look at the attached solution.
Thanks

Labels
Top Solution Authors