I regularly copy-paste texts from pdf files and such to InDesign. The original files often contain a significant amount of footnotes. The contents of the footnote texts are converted to plain text and appear as such:

[a bunch of text with footnote references]

10 See Articles 5(1)(f) and 32. (actual footnote text)

11 Article 32; see also Recital 83 (actual footnote text)

12 See Recital 87 (actual footnote text)

Guidelines on Personal data breach notification under the GDPR

[a bunch more paragraphs with footnote references]

13 It should be noted that a security incident [...] (actual footnote text)

14 See Opinion 03/2014 (actual footnote text)

This continues throughout the text. A such, all the footnote texts are spread out as they originally appeared at the bottom of the respective pages.

Now, I would really like a GREP command that will select all of the footnote texts at once so I can cut-paste them to somewhere else. So far I've managed to make this working expression:


This will select all footnote texts that appear in order plus the numbers.

From there I was trying to make a code which would look behind line 12 for example, and also look behind any paragraphs after 12 with regular text information and see if footnote text 13 etc. would come up:


The problem with something like this is that positive lookbehinds don't accept usage of a plus. So now I don't know how I can look behind any paragraph regardless of the amount of characters there are. How would I go about doing that?

1 Answer 1


^\d{2} Including two numbers at the beginning of the paragraph

(.+\r)* all the characters and plus until the end of the paragraph repeated 0 or more times

.+ and the last line of text


Edit after the comment

InDesign doesn't allow to make alternate selections within the same text.

What you can do is to make a copy of the whole text, and use this GREP


to find and change all the text preceded by two numbers to another color, and then with a simple search delete the black text, in this way you will only have the footnotes text:


  • This is a good start! Now I would like to only select the paragraphs starting with the number, leaving out 'Guidelines on [...]' and '[a bunch [...]' so that I only have footnote texts selected. Is that possible? Commented Dec 22, 2018 at 23:56
  • Answer updated.
    – user120647
    Commented Dec 23, 2018 at 11:56
  • Man... that is really very clever. Thank you very much! Commented Dec 24, 2018 at 0:01
  • 1
    @SilliusSoddus you should accept the answer. When you do let me know and I will remove the comments and also +1 your question.
    – user9447
    Commented Sep 23, 2019 at 11:55
  • 1
    I did :) totally forgot Commented Sep 24, 2019 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.