我有这些类型的亚马逊网址,我想从中提取ASIN
- https://www.amazon.com/RESCUE-Outdoor-Non-Toxic-Reusable-Attractant/dp/B07VDN12QX/ref=pd_day0fbt_sccl_1/138-2138307-6591363?pd_rd_w=L4jvw&content-id=amzn1.sym.fb2f9869-6657-4645-bf3b-01bcc75765ec&pf_rd_p=fb2f9869-6657-4645-bf3b-01bcc75765ec&pf_rd_r=1W2ZA66NTRVS760ZRZX5&pd_rd_wg=uKxPh&pd_rd_r=dd5f6632-2311-4f12-b701-184c02b5ad39&pd_rd_i=B07VDN12QX&psc=1
- https://www.amazon.com/gp/slredirect/picassoRedirect.html/ref=sspa_dk_detail_6?ie=UTF8&adId=A06306412QSO2QHC1E29S&qualifier=1664214292&id=892620518584137&widgetName=sp_detail_thematic&url=%2Fdp%2FB09XHYXH4K%2Fref%3Dsspa_dk_detail_6%3Fpsc%3D1%26pd_rd_i%3DB09XHYXH4K%26pd_rd_w%3DN7NuD%26content-id%3Damzn1.sym.3481f441-61ac-4028-9c1a-7f9ce8ec50c5%26pf_rd_p%3D3481f441-61ac-4028-9c1a-7f9ce8ec50c5%26pf_rd_r%3D1W2ZA66NTRVS760ZRZX5%26pd_rd_wg%3DuKxPh%26pd_rd_r%3Ddd5f6632-2311-4f12-b701-184c02b5ad39%26s%3Dmerchant-items%26sp_csd%3Dd2lkZ2V0TmFtZT1zcF9kZXRhaWxfdGhlbWF0aWM%26smid%3DA1RU2NZDC9WNW9
我一直在使用这个正则表达式-(?:[/dp/]|$)([A-Z 0 -9]{10})从这里https://regexr.com/3gk2s,但我仍然没有得到想要的结果
1条答案
按热度按时间7fyelxc51#
正确的正则表达式如下:
(?:[/dp/]|$)([A-Z0-9]{10})