Delete characters in URLs
-
Hello,
I need help to turn hundreds of Amazon affiliate links into non-affiliate links.
For each URL, I need to remove all the characters that if after the product ID (B0xxxxxxxx).
Thanks for your help guys.
Initial text
https://www.amazon.es/siete-maridos-Evelyn-Umbriel-narrativa-ebook/dp/B084X8WM2J?&linkCode=sl1&tag=quelibro-21&linkId=cd6016a5fdc1802be4f8b009277c44bc&language=es_ES&ref_=as_li_ss_tl
https://www.amazon.es/Todos-quieren-Daisy-Taylor-Jenkins-ebook/dp/B086LKDQDS?&linkCode=sl1&tag=quelibro-21&linkId=9c5225ee1130e513d649c1f0a2e20083&language=es_ES&ref_=as_li_ss_tl
https://www.amazon.es/Por-siempre-unidos-Titania-fresh-ebook/dp/B08KGF6YXG?&linkCode=sl1&tag=quelibro-21&linkId=0216a2ed6c631d3f04e754d968b0fb5f&language=es_ES&ref_=as_li_ss_tlDesired result
https://www.amazon.es/siete-maridos-Evelyn-Umbriel-narrativa-ebook/dp/B084X8WM2J
https://www.amazon.es/Todos-quieren-Daisy-Taylor-Jenkins-ebook/dp/B086LKDQDS
https://www.amazon.es/Por-siempre-unidos-Titania-fresh-ebook/dp/B08KGF6YXG -
- FIND =
(?-s)/B0\w{8}\K.*$
- finds
/B0
followed by 8 alphanumeric, then resets the match, and actually selects everything on the line after that
- finds
- REPLACE = make this box empty
- SEARCH MODE = regular expression
----
Useful References
- FIND =
-
@peterjones Great work. Thank you very much for your quick reply. I will save a lot of time thanks to you. You are a true genius. Many thanks again.