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
/B0followed 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login