Alteryx Designer Desktop Discussions

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

How to remove specific characters from a string

deepnandi
6 - Meteoroid

Hi All,

 

I am pretty new to Alteryx.

I am trying to derive specific set of characters from the string mentioned in below table (input) column. I tried data cleansing tool, Substring and Trim function in formula tool but was able to get a clean output. I need the output in manner mentioned in output column in table below. Any suggestions will be of great help. Thanks.

 

InputOutput
C006  - CBXYZAE9CBXYZAE9
C006 - CBXYZAE9 1/26/2021CBXYZAE9
C004  - CBXYZAE9 1/26/2021CBXYZAE9
C004 _CBXYZAE9 1/26/2021CBXYZAE9
CBXYZAE9CBXYZAE9
C006 
CBXYZAE9 1/7/2021CBXYZAE9
3 REPLIES 3
markcurry
12 - Quasar

Hi @deepnandi in your example below you could just check to see what cells contains CBXYZAE9, or is it more complicated than that, if not you could use this formula 

 

IF Contains([Input], "CBXYZAE9") THEN
	"CBXYZAE9"
ELSE
	Null()
ENDIF
Qiu
21 - Polaris
21 - Polaris

@deepnandi 

Better to have more data to see the patter, but if you already have the answer, we can do Find and Replace also.

Capture3.PNG

pedrodrfaria
13 - Pulsar

Hi @deepnandi 

 

I'm assuming over here that you do not know that the data will include "CBXYZAE9".

 

So I believe the best method would be to just the regex. We would need to understand how we can identify the expect string to be parsed. 

 

I included below a couple of examples: Parsing knowing the string or Parsing knowing the beginning of the string

 

Labels
Top Solution Authors