This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am trying to separate data from one field with a long string in each row into separate fields. My data is taken from a txt file and looks like this:
10/02/19 SGR OP 193 1
09/12/17 SP ADL 1889 2
01/23/19 CHG ROG 3566 186 Room RG.204/AIST
06/16/18 ALD SE RK 1655 1 Forwarded from OS1657888
I am able to separate out the text into different fields using the text to columns tool and using " " as my delimiter but I haven't found a way to separate out values while keeping the spaces between data like "ALD SE RK" or "Room RG.204/AIST" which I need keep together in one field.
I am new to Alteryx and I apologize if this is hard to understand. Any help would be appreciated.
You can separate based on patterns using RegEx in Alteryx. Because the consistent delimiter is multiple spaces, I'd replace those with another character (in the example here, I've chosen a hyphen), then use Text to Columns to separate on the hyphen.
With a formula tool, the expression Regex_Replace([Field],"\s\s+","-") will replace anything that's 2 spaces or more with a hyphen.