Basically I am looking to extract a URL until it encounters a number which may or may not be present
Examples:
http://www.test.com/products/cards/product_code/12345/something_else
http://www.test.com/products/cards/product_code2/
Desired output -
http://www.test.com/products/cards/product_code/
http://www.test.com/products/cards/product_code2/
Additional Information - Languauge agnostic regex similar to this question Getting parts of a URL (Regex)
Many Thanks