Hi friends,
some years ago I saved a GREP search in InDesign that finds dash-pairs with some text in between, and replaces the very first and very last space in the enclosed text with non-braking spaces. I mean things like this:
This is a sentence with – a Hungarian style – dashed text in it.
Here the spaces after the opening and before the closing dash should be replaced wiht their non-braking pair. I entered the following regular expression into the Find what field:
(–)( )([ ^~U ^~F ^\. ^~= ^\R ^\( ^\) ]+)( )(–)
(In the middle part I entered spaces between the different items so that it could be read more easily.)
It all means that please find an n dash, followed by a space, followed by some text that doesn’t contain the listed things (for example a paragraph end or another n dash), followed by a last space and the closing n dash. For now it is not interesting what I wrote into the Replace with field.
In earlier versions of InDesign (2020 and before) it worked finely but from 2021 it behaves very strangely: it finds what I want only in the Endnotes, but not in the main text or in the footnotes. I tried to copy the same texts into several places but the only hits were in the Endnotes.
Can someone check if it is only my problem? Or can someone explain me what is going on here?
Thanks, and all the best:
Tamás