Hello Everyone,
I am struggling with a problem that I couldn't find any solution on other topics that can fit my request.
I have a database from which I need to extract the first 4 to 9 digits on a separate col. in order to use it for a Join, but there is no specific conditions that are applied. On the photo attached you can see the input and the output that I want to have. I tried to eliminate the letters with the Data Cleansing tool, but after I need to find out how to extract the first 4 to 9 digits after first: space or / or . or , or any other characters.
Thank you in advance!
Solved! Go to Solution.
Hi @mihaicom20 , no problem at all. I went over to regex101.com and entered both the solutions offered. The captures below show you what each section of the regex is doing and explains it step-by-step on the right hand side. As you can see, they both provide the same end result. If you look at the regex tool in Alteryx, you will see the common regex available as a guide in the dropdown, this can also guide you when building it out - I've highlighted where these are and screen captured below. They are both basically just searching for any number of digits.
Check out regex101.com if you can, it allows you to enter your text and then play around and test your regex syntax. I also found it a good site when starting to learn regex.
Cheers,
Andrew.