Alteryx Designer Desktop Discussions

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

String manipulation in alteryx

96sudeshnasen
7 - Meteor

Hi. I need some help to encode a string. I would like to replace all the upper case characters in the string with '1' and all the lower case characters with '0'. 

 

So if my string is : "HELPweekEND", It should be converted to "11110000111"

 

I know the existence of the replace function but not getting any function to c

2 REPLIES 2
Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @96sudeshnasen,

 

I would use two regex replace formulas inside a formula tool to solve this issue:

 

Formula 1: REGEX_Replace([Test Text], '\l', '0',0)

 

Formula 2: REGEX_Replace([Test Text], '\u', '1',0)

 

image.png         image.png

 

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workbook for you to download if needed.

 

Regards,

Jonathan

96sudeshnasen
7 - Meteor

Thanks that helped! 

Labels