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?
Solved! Go to Solution.
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.
Try the Text to Columns tool, under the Parse category. Use either a dash or a space as the Delimiter.
Chris
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
Hi @Adityasa ,
I created workflow for you. It is combination of Text to column and Formula tool.
Regards,
Karolina