On amazon product pages, the ASIN is in the URL, and probably a lot easier to match, and less likely to change over time. For instance:
Minus a bunch of noise, is just:
https://www.amazon.com/dp/B00QPVMNNA
And "B00QPVMNNA" is the ASIN. A regex like /dp/([^/?]+)
should match, but you'll probably have to escape the forward slashes (/), I dunno I have not uses regexes in a Shortcut yet.