Hi all,
I'm interested in knowing if there's functions where you can extract specific data (item number information that may be numeric or alphanumeric) from URLs. The URL structure differs from one retailer to another so I'd be okay if individual functions are custom tailored for specific retailers (can be easily sorted out).
Here's a visual representation of what I'd like to accomplish:
For Wayfair:
1st type of URL:
Data: http://www.wayfair.com/12-Cup-Brewst...0-HMB1637.html
Output: HMB1637
2nd type of URL:
Data: http://www.wayfair.com/4.0-Cu.-Ft.-C...1466.html?PiID[]=14213412
Output: HER1466
* In both cases, extracted content appears after the last hypen (-) and before the '.html' and can vary in length depending on the item #
If the same function can be used for both types of URL, that'd be awesome
For Costco
Data: http://www.costco.com/Outland-24%22-...100222806.html
Output: 100222806
* the extracted content appears after the 2nd to last period (.) and before the '.html' and can vary in length depending on the item #
For Overstock:
Data: http://www.overstock.com/Bedding-Bat...7/product.html
Output: 7440617
* extracted content appears after the last 2nd to last forward slash (/) and before the last forward slash (/) and can vary in length depending on the item #
For Mill's Fleet Farm
Data: http://www.farmandfleet.com/products...ol-holder.html
Output: 581151
*extracted content appears after the last forward slash (/) and before the hypen (-)
For Sam's Club
Data: http://www.samsclub.com/sams/7-5ft-h...rod18310195.ip
Output: 18310195
* extracted content appears after the last forward slash (/), does NOT include 'prod' and before the '.ip'
Thanks
Bookmarks