Grep expressions with ~F in a character class fail in endnotes
The inclusion of ~F in a character class invalidates grep expressions in endnotes.
InDesign version: 14.0.2.324 (with the GREP fix installed)
Steps to reproduce:
- Open the attached document. It contains a single page with text and an endnote.
- In the GREP tab of the Find/What window, enter the following GREP expression:
\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.
To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.

Hi,
Thanks for reporting the issue
We are looking into it
-InDesign Team
-
Matthew Williams commented
Looks like this is still open, so hoping my case sheds some light. When I run a GREP search for any character between two tags, text between the tags that includes a footnote reference is missed by the find. I've attached a PDF showing what I mean and an InDesign file that you can test.
I have tried adding ~F to the GREP find (i.e., "[.~F]+"), but that seems to corrupt the find entirely. Just searching for "<u>[.+]</u>" finds the string as long as it doesn't include a footnote reference. If I add ~F ("<u>[.~F]+</u>"), the find fails to locate any occurrences, even those without footnote references. If I then delete the ~F, the resulting find—which matches the original—continues to fail to find any occurrences. Retyping the original find (rather than just deleting ~F) allows the find to work again.
I'm working on a Mac, OS 12.6.3, InDesign version 18.1 (reported as up to date in CC on 2/13/2023).
-
Peter Kahrel commented
The inclusion of ~F in a character class invalidates grep expressions in endnotes.
InDesign version: 14.0.2.324 (with the GREP fix installed)
Steps to reproduce:
1. Create a document, add some text and add a an endnote.
2. Make sure to add a digit followed by any characters and a dot or comma in both the text and the endnote. (I would post a file if this forum accepted them, but it doesn't.)
3. In the GREP tab of the Find/What window, enter the following GREP expression:\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.
\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.
-
Peter Kahrel commented
The inclusion of ~F in a character class invalidates grep expressions in endnotes.
InDesign version: 14.0.2.324 (with the GREP fix installed)
Steps to reproduce:
1. Open the attached document (named .jpg because this forum doesn't accept indd files). It contains a single page with text and an endnote.
2. In the GREP tab of the Find/What window, enter the following GREP expression:\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.
-
Peter Kahrel commented
The inclusion of ~F in a character class invalidates grep expressions in endnotes.
InDesign version: 14.0.2.324 (with the GREP fix installed)
Steps to reproduce:
1. Open the attached document (named .jpg because this forum doesn't accept indd files). It contains a single page with text and an endnote.
2. In the GREP tab of the Find/What window, enter the following GREP expression:\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.
-
Peter Kahrel commented
The inclusion of ~F in a character class invalidates grep expressions in endnotes.
InDesign version: 14.0.2.324 (with the GREP fix installed)
Steps to reproduce:
1. Open the attached document (named .ixx because this forum doesn't accept indd files). It contains a single page with text and an endnote.
2. In the GREP tab of the Find/What window, enter the following GREP expression:\d[^.,;~F]+
And target the document. The expression matches from a digit up to the next period, comma, semicolon, or footnote marker.
Expected result: The expression should match some text in the main text and in the endnote.
Actual Result: The expression does not match anything in the endnote.To show that it's ~F that's the problem, use this expression:
\d[^.,;]+
It matches in the main text and in the footnote, as expected.