I notice that there is a space before the unwanted paragraph symbol while there is no extra space before the correct ones. If this is consistent throughout then a global Find/Change could do this task simply. Set up in the Find field space^p and in the Change field just a space. All of the unwanted paragraph symbols will then just become spaces within the rejoined paragraphs.
Good idea, thank you! But sorry, it will not work throughout the document because not all the unwanted paragraph marks have spaces in front of them.
> when I conduct a search, for some reason paragraphs with footnote markers are skipped.
That's caused by an age-old bug in InDesign: the . doesn't match the footnote marker.
If Bill's suggestion doesn't work for you, you could search for a paragraph mark that's not followed by a digit:
Note that if you specify a character or a paragraph style in the search, those styles apply to the whole expression. So it's not possible to search for "abc in character style 1 followed by xyz in character style 2".
Thank you Peter! This worked for me! I clearly couldn't see the wood for the trees myself in order to realise this search query. However, in the footnotes it was finding some unintended things but I do not really need the search for the footnotes so I just conducted a body search.
It would be nice if a search query could be written as set out in the original question. The query seems trivial when looking at the picture but when writing it out it is not so trivial.
> It would be nice if a search query could be written as set out in the original question.
Again, it's not possible because any style you set in the 'Find format' panel applies to the whole expression. The first three lines of your recipe can be captured by
Find what: ^\d+
Find format: paragraph style 'Paragraph style 1', character style 'Bold'
This query matches just the bold numbers (in 'Paragraph style 1' paragraphs). Nothing else. To inspect different styles in a single text range, you need a script.
> The query seems trivial
Famous last words. . .