Hi,
Following up on part 2 -> https://community.alteryx.com/t5/Alteryx-Designer-Discussions/RegEx-Pattern-Desired-Ouputs-Part-2/m-...
*all parts are coming from one column with different variations of the string
I have hopefully one last task, to pull out the desired outputs from the attached data set. Just like part 2, I need 6 different outputs.
Please see below a sample of patterns from the data set.
Can someone help me pull out these 6 different columns from the one string column using one Regex tool?
Thanks,
Solved! Go to Solution.
Regex:
^([A-Z][[a-z]+)(\w+)\s(.*?)(=?\(|Truck|Van)\s*(?:\((\w+).*?\))?(?:(incl\.[a-zA-Z ]+))?(.*)
@JonaV90 this one is better than the other one. I made an unnecessary extra column.:
Regex:
^([A-Z][[a-z]+)(\w+)\s(.*?Truck|.*?Van)\s*(?:\((\w+).*?\))?(?:(incl\.[a-zA-Z ]+))?(.*)
I missed one desire output column. See image below
can you also have that one included?
Thanks,
Nvm, I got it!
^([A-Z][[a-z]+)(\w+)\s(.*?Truck|.*?Van)\s*(?:\((\w+)-?(.*?)\))?(?:(incl\.[a-zA-Z ]+))?(.*)
^([A-Z][[a-z]+)(\w+)\s(.*?Truck|.*?Van)\s*(?:\(([a-zA-Z]+)-?(.*?)\))?(?:(incl\.[a-zA-Z ]+))?(.*)
@JonaV90 Great stuff. You solved your own problem! 😁. Mark your answer off as a solution aswell.