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

Get text to right of special character (>)

Adityasa
7 - Meteor

I have the following data set.

 

Apple -> Alpha

Ball -> Beta

Cat -> Charlie

Dog

Elephant

Fish -> Foxtrot

Ginger -> Golf

 

I want the following output

Alpha

Beta

Charlie

Dog

Elephant

Foxtrot

Golf

 

How to do it?

4 REPLIES 4
mbarone
16 - Nebula
16 - Nebula

I would use a RegEx tool, specifically the replace mode.  I'd replace everything up to and including the ">".  In RegEx, that would be .*>

 

Check out the tool mastery index on the RegEx tool - very valuable, and also download RegEx Coach so you can practice.

ChrisTX
15 - Aurora

Try the Text to Columns tool, under the Parse category.   Use either a dash or a space as the Delimiter.

 

Chris

 

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Adityasa ,

 

you can use a  Formula tool using the following expression:

 

Trim(Replace(SubString([Field1], Max(0,FindString([Field1], '->'))), '->', ''))

 

FindString([Field1], '->') returns the starting position of your special character, if it's not part of the string, it returns "-1"

Therefore I use MAX(0, FindString()), if "->" not found, you get 0

 

SubString cuts the string including the special character, this is removed by Replace, Trim also removes leading/trailing blanks.

 

Let me know if it works for you.

 

Best,

 

Roland     

KarolinaRoza
11 - Bolide

Hi @Adityasa ,

 

I created workflow for you. It is combination of Text to column and Formula tool.

 

KarolinaRoza_0-1624448135845.png

 

Regards,

Karolina

 

Labels