Find and replace -> change only word, leave same formatting

Hello, guys.
For example in my text I have wordS cat and I need to replace it by dog

cat cat Cat

dog dog Dog

need to leave fully formatting enclude capital letter if it exist

Hi

Altsearch extension handles Preserve capitalization option.

Download then ToolsExtension ManagerAdd to install. Do not forget to quit & restart LibreOffice for extension deploying.

The only alternative I see is to find & replace twice by checking the Match Case option.

Regards