Hello Alteryx Community
I am helping a client who has received data from a third party source who are rather difficult to deal with and therefore can't go back to them for 'cleaner' data. There are two columns (please see image and attached sample data). A short name and a long name. The long name is made up of other information and ends with the short name. I would like to remove the short name from the long name. This would be easily done with a replace but when extracting the data the third party provider must have limited the size of the field, as some rows of data the end of the long name has been cut off. Is it possible to do some kind a find replace or regex match to remove the partial data from the long name using the short name. Any help is greatly appreciated.
Thank you very much.
Solved! Go to Solution.
How about:
Trim(Replace([field2],[field1],""))
cheers,
mark
@Chris_Waspe You'll need to see how it works on your actual data, but perhaps you could just look for the first so many characters of short name. I arbitrarily chose 15.
trim(Left([MKT_LONG],FindString([MKT_LONG], Left([MKT_SHORT],15))))
You could just use the first x characters to find the end of the required string. I've used 10 but whatever is appropriate.
trim(left([MKT_LONG],findstring([MKT_LONG],left([MKT_SHORT],10))))
Hi Patrick
Thanks for the help. This should do it