I\'ve got some JavaScript that looks for Amazon ASINs within an Amazon link, for example
http://www.amazon.com/dp
In your case an expression like this would work:
/(?!\/e)..\/([A-Z0-9]{10})/