Find and Replace only format of multiple different words

I have a document with multiple images with captions like this: Figure 1: Tile, Figure 2: Title, Figure 3: Title…

I have the style of those captions in regular format, but I want to convert them to bold (but only the part “Figure 1:”, “Figure 2:”,… not the title.

I have previously watched out for a solution in the forum but find nothing. I also installed the extension Alt Search but I did not found anything that could help me in its official documentation:

I know that from the caption styles I can put all in bold, but as I said I only want to have in bold the part “Figure 1:”

I have not any problem finding all figures. After checking the “Regular expressions” in Find and Replace, I put the following: ^Figure .1*:

That finds all the Figure 1,2,3…:

The problem comes when replacing. I try changing the format in the replace part, but when replacing all the text is deleted, because I leave it empty (as I do not want to change any text, only the formatting).

To be precise, that finds all starting Figure followed by a blank followed by any character followed by zero or more digit 1 characters followed by : colon. You want Figure \d+: instead.

@mariosv Thanks! I forget trying that… I think the problem has been I was using ctrl+b instead of directly clicking on the “B” of bold in the menu, or clicking out of the document to use ctrl+b (I was not clicking out of the find and replace menu and also clicking inside the document, so I was losing the selection). Silly mistake…

@Wanderer Using & or $0 does not work. It changes all figures to the same thing. See this capture:
Screenshot from 2022-12-26 19-27-34

All my figures appear like Figure and a symbol (see capture), so despite I can change the format it is useless because it changes the numbering style and makes all numbers identical.

But that happens when I use ^Figure .1*: in Find and & or $0 in Replace
When I use what erAck recommends in Find it works, so

Find: Figure \d+:
Replace: & or $0
Then I put the cursor in Replace and select Format > Font > Style > Bold
Replace All


You don’t need to replace. After ‘search all’, they are selected, apply to them ‘bold’ or better a character style with ‘bold’, so to change them in the future, it’s enough with modify the character style.

you could use & or $0 as replacement as this replaces with the found text.