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.
New to Alteryx and have been tasked with cleaning up some data that is more complicated than I expected.
We have Type recorded in a string of user details and I need to pull out the type value (4 or 5 digits) into a new column. The problem is that Type has been entered with absolutely no consistency in the field.
As you can see, sometimes it is Type with no space, Type:, Type# or even my favorite, Type #= .
I've been trying to go about it with RegEx but I'm not getting anywhere :)
Mine's a little different in that it looks for "Type" followed non-digits followed by digits
I then use another Regex to pull the digits from this. I know that there is a way to search within the previous results, and combine the 2 regex tools into one, but my regex-FU is not strong enough. Maybe @Thableaus can help here.
I think REGEX tool with Parse Method would work with this single expression:
This would bring any sequence of digits after the word type (uppercased or not since we are considering case insensitivity here) and a non-word character 0 or more times (that would be all of the symbols or spaces that the author of the topic mentioned).