For use with ViolentMonkey/GreaseMonkey.
For testing regex I use regex101.
Regular expression (make sure it matches what's in script.js
):
(?<=ebay).*?(?=\/)
Test strings:
https://www.ebay.com/
https://www.ebay.com/itm/111222333444
https://www.ebay.ca/
https://www.ebay.ca/itm/111222333444
https://www.ebay.co.uk/
https://www.ebay.co.uk/itm/111222333444