Skip to main content
Bedazzled532
Inspiring
October 19, 2022
Answered

Endnote GREP issues

  • October 19, 2022
  • 2 replies
  • 1042 views

Hi,

 

I have a text where there is a space before endnote marker. I want to remove it from the whole book.

This is what I am entering in Find: (\{0020})(~U)

But this expression is not finding the match at all. I have attached a screenshot. Number 5 is in paranthesis which is an Endnote. There is a space before it. I want to remove the space before it.

In the Replace Text box I will enter $2. (wrongly tryped in the attachment as $2$1)

It aint working.

 

Any help will highly be appreciated.

Thanks.

This topic has been closed for replies.
Correct answer Peter Kahrel

This is an Adobe special. You're right, space+endnote marker doesn't find anything, whether you use \h, \s, \x{0020}, \x20, or even the literal space character. But ~F, the footnote marker, matches endnote markers as well. So you can look for \x20~F and remove the space.

 

Be careful with the note marker, you can't use it the way you did. To remove the space before note markers, use this:

 

Find what: \x{0020}(?=~F)

Change to: <leave empty>

 

(?=~F) is a lookahead: so the expression finds only the spaces that are followed by a note marker but leaves the note marker alone.

 

P.

2 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
October 19, 2022

This is an Adobe special. You're right, space+endnote marker doesn't find anything, whether you use \h, \s, \x{0020}, \x20, or even the literal space character. But ~F, the footnote marker, matches endnote markers as well. So you can look for \x20~F and remove the space.

 

Be careful with the note marker, you can't use it the way you did. To remove the space before note markers, use this:

 

Find what: \x{0020}(?=~F)

Change to: <leave empty>

 

(?=~F) is a lookahead: so the expression finds only the spaces that are followed by a note marker but leaves the note marker alone.

 

P.

Bedazzled532
Inspiring
October 19, 2022

Wow 

Thanks so much Peter. It worked like a charm.

Thanks a ton.

Community Expert
October 19, 2022

Should be 

\x{0020}

See if that works

Bedazzled532
Inspiring
October 19, 2022
I tried \x{0020} but tht aint working
Community Expert
October 19, 2022

Well that's for space - so it worked for me. Unless it's not normal space

 

try \h instead.