Character styles in the Replacements list

Hi,

I’m trying to replace several strings with a particular character style applied, with different strings with the same character style applied.

Is there a way to do it in the Compile > Replacements dialog? There is no explicit function for it, but maybe this can be done with some variables in the find/replace fields?

Paolo

I doubt that would work in Compile > Replacements. In this piece, the purple text us an alternative character style (same font, but that’s irrelevant), the colour is the differentiator and has personal significance.

However, here’s the result of using find and replace.

Replacing a word in the string, mother with father, works fine.
image
image

Replacing the entire string in alternative text also works
image

I need it to work in Replacements, because I have to do a mass replacement or several hundred entries.

It is also important that is isn’t just local formatting, but a character style.

So, I guess it would be even more complicated.

I’m thinking to a workaround based on exporting, doing a replacement outside of Scrivener, searching & replacing based on the surrounding tags, and the reimporting.

Paolo