I'm having trouble finding a sequence that works it InDesign to move full stops (US English: periods) before footnote(s) when they trail the superscripted endnote references to a word/phrase.
so make thisfoo<sup>23,25<sup/>
. into thatfoo.<sup>23,25<sup/>
( tags not literally there just indicating to you the reader these are numbers in superscript but Markdown doesn't do superscript I think)
because my positive look behind is not working I'm look to use a sequence of two or more
positive lookbehind` tokens, but is this inside the rules?
I wrote a GREP token that hits all the endnotes references, whatever combination of spaces, commas and digits. But I can't replace with found in InDesign because it breaks all the hyperlinks to the endnotes. So I need to use positive lookahead and positive lookbehind to move the full stops. First remove the existing then add the new one before the endnotes. But the same token, say this one of many possible to pick up any of
{n, n, n…} —> \d[\d\, \,]+
(and I add '\.'
to catch the period) will not get a single hit as an argument for a positive-lookbehind token
i.e. (?<=\d[\d\, \,]+)\.
doesn't get a hit. tried various variations too. and lookahead. What about what ID calls "unmarking subexpressions" which Text Wrangler I think refers to as Perl-Style Pattern Expressions?
I can use negative lookbehind
to find periods following digits+ i.e. (?<![a-zA-Z])\.
but it won't give me the entire endnotes references sequence to mark and put a period preceding it.
This GREP is all executed within Adobe InDesign layout software, so no command line execution. It's okay if I use two operations not all done with one Find/Change operation. First add preceding period. Second remove trailing period.
i want to remove the period char at green arrow and add one at the red arrow for any given series of endnote reference numbers and commas. The central problem is that found hits on endnote strings CANNOT be used in the Change To token as found strings because that will remove their (hidden) indexing as Cross-References linking them to Endnotes which will result in hyperlink connections in exported PDF (amongst other reasons). (ignore the Find token in the screenshot)