^https://reddit.com/|https://old.reddit.com/ - will remove the path completely, removing the last slash solves it.
^https://www.amazon.com/|https://smile.amazon.com/ - it won't work similarly, but I can't remove the ending slash because I don't want it to rewrite amazon.com.au.
wikipedia.org|m.wikipedia.org - en.wikipedia.org will become just m.wikipedia.org, I still want the prefix "en".
This should work just as the replace in sed or any find-and-replace tool.