Skip to main content
Inspiring
June 13, 2021
Answered

Generic find/replace changing styles...

  • June 13, 2021
  • 2 replies
  • 624 views

Find/replace seems buggy now -

 

I'm doing the standard replacing of "space-return" with "return", and in every case, the paragraph following the return takes on the style of the return.

This did not happen before.

Have I missed something? Am I forgetting something? (Probably...)

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

I just checked and it happens in CS6 as well so I think you may be misremembering.

 

Try a GREP find for \s+$ (any whitespace at the end of a paragraph) and leave the change field blank (which will remove the whitespace, but not the return and replace with nothing).

2 replies

JeffPWest
Known Participant
October 14, 2022

I was just about to post this. I also didn't think this was default behaviour (unless I have only ever done it with consecutive paragraphs in the same style, which is possible).

This seems to be unexpected behaviour if the style boxes are empty, I would assume the space to be removed, replacing the End of Paragraph with the same style.

I will save the GREP command though - and I just checked that this function is included in FindChangeList script, which MIGHT be where I usually perform this replace (I haven't had an InDesign project for a while!)

Peter Spier
Community Expert
Peter SpierCommunity ExpertCorrect answer
Community Expert
June 14, 2021

I just checked and it happens in CS6 as well so I think you may be misremembering.

 

Try a GREP find for \s+$ (any whitespace at the end of a paragraph) and leave the change field blank (which will remove the whitespace, but not the return and replace with nothing).

turner111Author
Inspiring
June 14, 2021

Hi Peter - 

Thanks for the note.
I don't think I'm misremembering; I've done this for hundreds if not thousands of documents as a "space-return" combination is one of my biggest peeves. Don't know how I must have done it...
[Scratches head, mysterious music plays]

I don't know how to use GREP, so that's not a possibility... I should learn... I'll try this out.

OK! I've tried this out. Brilliant, as it also removes multiple spaces before a paragraph return. Just ran out and picked up a GREP reference chart here.

Peter Spier
Community Expert
Community Expert
June 14, 2021

Glad to help.

 

GREP is an amazing tool. Get yourself a copy of Peter Kahrel's guide to using GREP in InDesign: https://sites.fastspring.com/publishingsecrets/product/GREP3