Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Find and extract selected characters from the string, sequence is important

vinodbombale
7 - Meteor

Hello team,

I want to extract |, ~ and __ from the string value. sequence of these character matters in output. String value may have sentences.

 

Below is the example for expected output

 

InputExpected Output
REG1 | REG4|
REG2a ~ REG2b | REG5~|
REG3a ~ REG3b ~ REG3c | REG6~~|
HTA2a __ HTA2b | HTA5__|
HTA3a__HTA3b1~HTA3b2__HTA3c | HTA6__~__|

 

It would be great if you can help with work flow for character extraction.

 

Thanks in advance

Vinod

4 REPLIES 4
MarqueeCrew
20 - Arcturus
20 - Arcturus

@vinodbombale ,

 

 let's try:

 

regex_replace([your field],"[~\|\,\~\ _]","")

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
KarolinaRoza
11 - Bolide

Hi @vinodbombale 

 

to extract these characters you can use regex and then I removed white spaces.

Let me know if it works for you.

Regards,

Karolina

 

KarolinaRoza_0-1620385906868.png

 

RaviP
8 - Asteroid

Hi @vinodbombale, here's one without using regex, using the data cleansing tool. Works when your input has only numbers and letters, along with the special characters.

 

RaviP_0-1620392049514.png

 

mceleavey
17 - Castor
17 - Castor

Hi @vinodbombale ,

 

I think mine might be the simplest (in fitting with my personality).

 

Simple Regex:

 

mceleavey_0-1620393276886.png

 

mceleavey_0-1620393325443.png

 

M.



Bulien

Labels