2 Replies Latest reply on Jul 29, 2011 4:24 AM by Fritschy

    Using footnote markers in a GREP search

    Fritschy Level 1

      In a 300 page document, with hundreds of footnotes, I want to insert thin spaces between single endquotes and footnote markers. The easiest way seemed a GREP search and repace. I search for (\’)(~F) and replace it with $1~<$2. The result is ’ ’ (endquote-thin space-endquote). When I try to replace AB to A-thin space-B in the same way, the result is right. So what's going wrong? (I also tried ~] for the endquote.)

      (By the way, I have a workarround, but I'd like to understand how GREP searches work.)

        • 1. Re: Using footnote markers in a GREP search
          [Jongware] Most Valuable Participant

          Footnotes aren't really a part of the semi-official GREP definitions, and I imagine the Adobe programmers had to fix a couple of workarounds to make them work at all. They are not simply single characters (quotes, spaces, and possibly text variables are) but "contain" lots of other information, just like anchored objects do. That could be the reason they don't Play Nice with regular GREP operations.

           

          In this particular case, you can work around it searcing for but not replacing the footnote marker code. Look for

           

          (\')(?=~F)

           

          and replace with

           

          $1~<

           

          The combo (?=~F) will find but not include the footnote code, and thus nicely circumvent the problem.

          • 2. Re: Using footnote markers in a GREP search
            Fritschy Level 1

            Yes, this works fine. Thanks again!