Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Get Build Number out of string RegEx

dlesny
8 - Asteroid

Hello

I need to Parse URL links to get just the Jenkins Build number out. Links vary in length and number of "/" that's why I find it difficult.

Names can be different, Users can input digits inside the link also. Sample data below. Please help

 

So I am looking to get only the "BuildNumber" at the end before the //consoleText.

 

This is always there in every link "BuildNumber"//consoleText I am sure somehow maybe that can be used?

 

 

https://some-sample.link.to.website.com/job/AC-CICD-Pipeline/3//consoleText

https://some-sample.link.to.website.com/job/AC-CICD-Pipeline/4//consoleText

https://some-sample.link.to.website.com/job/AC-CICD-Pipeline/2//consoleText

https://some-sample.link.to.website.com/job/AC-CICD-Pipeline/1//consoleText

https://some-sample.link.to.website.com/job/Adobe-Campaign-Deployment/129//consoleText

https://some-sample.link.to.website.com/job/Adobe-Campaign-Deployment/128//consoleText

https://some-sample.link.to.website.com/job/Campaign Test/1//consoleText

https://some-sample.link.to.website.com/job/Datanauts-TA/21//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/19//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/20//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/18//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/17//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/16//consoleText

https://some-sample.link.to.website.com/job/Datastage_DEV-QA/job/BUILD-Datastage-QA/15//consoleText

https://some-sample.link.to.website.com/job/Test Automation Dev/job/NA DS WebService Tests DEV/295//consoleText

https://some-sample.link.to.website.com/job/Test Automation Dev/job/NA DS WebService Tests DEV/294//consoleText

https://some-sample.link.to.website.com/job/Test Automation Dev/job/NA DS WebService Tests DEV/293//consoleText

 

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @dlesny you could use a regex tool and parse out the number from the url using the syntax (\d+)Regex_020919.PNG

JosephSerpis
17 - Castor
17 - Castor

Hi @dlesny you can amend the regex slightly to cope with that based on your examples there always a / then //  so if I change the syntax to /(\d+)// it will only find numeric numbers in between those characters. I've attached a sample workflow where I added some additional numbers to the first two rows and I only extract the numbers between those characters.

dlesny
8 - Asteroid

Awesome! Thank you very much this is perfect.

Labels