Question: i want to replace 5000 image url from old server to new server
the following is an example of url for an image from the list
<https://olddomain.tld/dir1/dir2/attachments/000/020/363/large/Garlic.jpg>
now i want to replace from https to last forward slash in the url with "<http://newdomain/images_folder/>"
how could this be done using sed ?

Answer: 
The solution is actually quite simple through the use of `*` which, by default, is greedy in `sed` (i.e. it matches the longest selection possible). Therefore you can match everything up to the last slash with `^.*/`

Putting this into a full sed command:
`sed 's|^.*/|{new url}/|'`
I found the answer:

```
sed 's|.*/|http://newdomain.com/images|g'

```