Skip to main content
Known Participant
June 3, 2023
Answered

Is there a way find endnote text markers with GREP?

  • June 3, 2023
  • 3 replies
  • 1279 views

The GREP code ~U will find an endnote reference marker in the text. What I want to do instead is find the beginning and ending endnote text markers in the endnote frame. My goal is to apply conditional text to certain endnotes using Find/Change.

This topic has been closed for replies.
Correct answer Peter Kahrel

You can't find the endonote markers with Grep (or Text). But you can find endnotes, which amounts to the same thing -- provided that you used dedicated endnote paragraph styles, as Scott mentioned. You can then find tendnotes and selectively apply a condition. To find those endnotes, use the Grep tab and use ^.+$ to match the endnote texts.

3 replies

James_M_SAuthor
Known Participant
June 4, 2023

I'll reiterate what's in my reply to Scott. No one will probably want to apply a condition to endnote text. Experimenting with it, I found that the endnote text can be hidden but often can't be unhidden -- it gets lost.

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
June 3, 2023

You can't find the endonote markers with Grep (or Text). But you can find endnotes, which amounts to the same thing -- provided that you used dedicated endnote paragraph styles, as Scott mentioned. You can then find tendnotes and selectively apply a condition. To find those endnotes, use the Grep tab and use ^.+$ to match the endnote texts.

James_M_SAuthor
Known Participant
June 3, 2023

Thanks, Peter. That work-around makes sense.

Scott Falkner
Community Expert
Community Expert
June 3, 2023

If you want to apply GREP styles to endnotes use a dedicated style for your endnotes.

James_M_SAuthor
Known Participant
June 3, 2023

Thanks for the reply, Scott.

Is there a way to apply conditional text in a paragraph style or with a character style? Applying conditions to endnote text is my ultimate goal. It may be moot, because after playing around with it some more it looks the endnote text as well as the endnote reference can be hidden but will be lost.

The more basic question is whether there's a way to find beginning and ending endnote text markers with GREP. I'm still curious about the answer.