Copy link to clipboard
Copied
I have an object which I want to place after Footnote reference denoted by a character style named "Reference"
I copied the object by CTRL+C and doing a Find Change usign GREP.
Here are the Parameters of Find and Change:
F: ~F
R: $0~c
Find Format: Character Style: reference
The weird thing is that if I do Find and then Change it works but when I do Find and Change All, its pastes the object but instead of Footnote reference its shows <?>
Meaning Single Find/Change works but Find/Change All not working.
Attaching a screenshot.
How to resovle this issue ? Plz help.
Thanks and regards
Try the following
Find What:- (?<=~F)
Replace With:- ~c
Find Format: Character Style: reference
-Manan
Copy link to clipboard
Copied
Try the following
Find What:- (?<=~F)
Replace With:- ~c
Find Format: Character Style: reference
-Manan
Copy link to clipboard
Copied
Thank you so much Manan. It worked like a charm.
Just for the sake of learning, could you explain why lookbehind has been used ? As per the rules of lookbehind, it should find something if (?<=~F) is behind. Ideally there should be something after this (?<=~F). I always get confused in this stuff. Thanks a lot once again for solving my issue.
Copy link to clipboard
Copied
There are two things
I hope this explains you my approach to the problem
See the following
https://regex101.com/r/8k0RC8/1
Notice the cursor right after e and the search result is null. So this is what a lookbehind/ahead means in itself.
-Manan
Copy link to clipboard
Copied
Thank you so much Manan.
Your explanation was very helpful.
Regards