I was hoping some of the more experienced Alteryx users could help me out with how to go about separating the last two digits/characters from what we would call a product code from our database list. An example would be product code J2102HG05. Usually the last two digits/characters, in this case 05, has a unique meaning to us which we are looking to identify for some upcoming projects. I would like to split the original product code such as J2102HG05 to two columns, one being the main stem of the code such J2102HG and the other column being 05. I think my answer would be using the parse method from the Regex tool but I am stuck on developing the expression.
Solved! Go to Solution.
Any time I see the word "Usually" in a problem statement, as in "Usually the last two digits/characters", I double my time estimate. @RolandSchubert has a great, simple solution, but it depends on the data always having those last 2 characters. Do you have any special cases you need to deal with? If so, then a regex solution is better suited to handle those.
Dan
Thank you everyone for the help. Luckily, with this specific set of data, the last two digits were unique and the left right formulas were able to be used here with the first suggestion. I did not even think of that, I was so dead set on the Regex tool. I did use the Regex tool as well and that worked as well and helped me begin to understand how to form a Regex expression. Thank you for all your help!
You are so right about "usually" luckily in this case I scoured the data prior and knew that was the case for this specific set of data. Thank you so much!