A .* toggle beside match-case and whole-word takes the term as a pattern; a pattern that will not compile simply finds nothing. Each match keeps its captures, so the replacement expands $1…$9 and $& the way LibreOffice does — Word has no equivalent.