Alteryx Designer Desktop Discussions

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

Text Trimming Issue

Harsha_01
6 - Meteoroid

Hello Everyone,

 

I have facing Issue with trim the Text for custom and un even text. I want to trim the text in between brackets. But the problem is The text length is not Even length. Please see the Following Text. Any help would be very help to me.... Thanks

 

I have used substring, Pad right, R trim, Replace but no Luck

 

Source Text:

 

BNDCCAMXX (ABC BANK OF ITLY)
HSBCSGSGRRPOZZ (The Hongkong Banking)
SCBLINCCBDEL (Indian Bank)
CHASAU3 (JP Morgan Canara Bank)

 

 

Required Result Text:

 

BNDCCAMXX
HSBCSGSGRRPOZZ 
SCBLINCCBDEL 

CHASAU3

 

 

Thanks in Advance

Harsha

8 REPLIES 8
BRRLL99
11 - Bolide

BRahuL99_0-1664976164389.png

 

IF you want to remove spaces from Column 1, you can use Data Cleansing Tool,

Column 2 and 3 can removed using select tool

BRahuL99_1-1664976258740.png

 

If you got the expected result Please like and accept it as solution

MilindG
12 - Quasar

Okay, I have attached a file that shows you couple ways to do this.

Harsha_01
6 - Meteoroid

I tried but it's not working

BRRLL99
11 - Bolide

Please show ur workflow

Christina_H
14 - Magnetar

A formula would be another option:

if Contains([text],'(') then trim(left([text],FindString([text], '('))) else [text] endif

CarliE
Alteryx Alumni (Retired)

Hi @Harsha_01 

 

CarliE_0-1664989553320.png

 

Just use a regular expression to parse out the data! This looks like it get your desired outcome 

 

Here is your regular expression:

(.+)\s\(

 

Please mark this as a solution if this solved your issue.

 

Carli
Harsha_01
6 - Meteoroid

Hi Carlie,

 

 

Thanks for the Help your solutions is working like a charme, Thanks alot

 

 

Regards,

Harsha

Harsha_01
6 - Meteoroid

Hi'

 

For other data file this solution is working like star..... Thanks a lot for your kind and support 

 

 

Regards,

Harsha

 

 

 

Labels