The other answers almost got it right. The find expression is correct:
* in place of
+ in order to match
c as a single word, and I've added a trailing
\b to make the word limits more clear, but the original form is OK.
The replacement string should be:
This does accord with Jim K's documentation link, but it is rather confusing in this area.
\1 can be used in the search expression, to repeat a string matched earlier in the expression, but
$1 must be used in the replacement string. The use in the search string means that
(a.b).*\1 will match
b with a character between, followed by
b with the same character between. This is not the same as
a.b.*a.b, where the intervening characters may be different. The example in the documentation link is correct, but does nothing to explain where it will be useful.
As a final note, my version 220.127.116.11 of LibreOffice Writer refuses to make substitutions when the search string starts with
\b, although it finds all the instances correctly; a trailing
\b works as expected. This is a bug - OpenOffice 4.1.3 works correctly. The work-round is to use
([^a-z]\bc[a-z]*)\b as the search string with the same replacement string: this works in all cases except when the first word of the document begins with