Is there any way of finding and replacing footnotes inside punctuation with the same number footnote outside the punctuation? I don't mind doing separate find and replaces for all conceivable types of punctuation (full stops, commas, exclamation and question marks) but if I have to do it all manually it's going to take days as there are thousands of footnotes and almost all of them have been placed inside punctuation, i.e. footnote then full stop rather than the footnote after the full stop. I know there is a GREP to find the footnotes but I can't find a way of getting it to replace the footnote with the same footnote, or of leaving the footnote and moving the punctuation. Thanks in advance!
So basically you have two groups: a footnote and a punctuation.
Turn them into marking subexpression by wrapping them with parenthesis.
Then, you'll be able to recall them in order to swap them:
You'll notice I added ~e in the character class. It's the metacharacter for ellipsis.
There's a posix metacharacter called [[:punct:]] that includes all punctuation signs. I would advice not to use it because it catches signs you (1) might not want to catch.
Additional thought: in case you did set up your footnotes as per the example above (number followed by a dot), do not forget to untick "include footnotes" in the Find/replace panel.
(1) Please note that, as a Frenchman, I don't know the English rules about footnotes placement. Apparently they are different from ours...