If I run this code in bash:
echo dog dog dos | sed -r \'s:dog:log:\'
it gives output:
log dog dos
How can
You have to put a g at the end, it stands for "global":
g
echo dog dog dos | sed -r 's:dog:log:g' ^