I had a client that needed to modify his amazon urls, thought I would share the regex I used incase anyone else wants it.
matches urls
regex
matches urls
#(?:http://(?:www\.){0,1}amazon\.com(?:/.*){0,1}?:/dp/|/exec/obidos/ASIN/|/gp/product/))(.*?)(?:/.*|$)#


Comment