Sed -e "s/big \(.*\) dog/small \1 cat/" filename
Explanations:
1> -e - is used when using multiple replacements usinf regular expressions or not
2> you are searching for "big" and "anything after that" and then "dog"
3> you are replacing "big" with "small" and "dog" with "cat" without deterioriating the "anything after that" text
when
sed searches, it remembers the \(.*\) and it can be accessed using \1.
hope this helps.
Cheers,
Devaraj Takhellambam