Skip to main content
Participating Frequently
December 3, 2024
Question

GREP Replace All not working properly

  • December 3, 2024
  • 3 replies
  • 777 views

I often use GREP to separate one text frame into several frames, but in the latest version when I do this, the frames after the first one (or second one depending on the case) are empty.

Let me explain a bit better:

Let say I create a text frame with the text "x x x x x" (without the ") in it, and with GREP I replace each space with a frame break using the Replace All function, then go to my frame, click on the red + and chain a new frame, I get a frame with the next x, as it should but the next frame is empty, the one after is also empty, and the last one has xcxcx in it.

The exact same method in the previous versions (up to 19.5.1) gives me 5 frames with an x in each.

Do you good people experience the same problem?

This topic has been closed for replies.

3 replies

Joel Cherney
Community Expert
Community Expert
December 3, 2024

Do you good people experience the same problem?

 

Not at first, it turns out. I recreated your frame, set up a Find/Change query in the GREP tab where I searched for \s and replaced with ~R, and it behaved in v20 exactly as it did in v19. 

 

At least, that's what it did the first time. I then replaced the \s with an ordinary, whack-the-space-bar space and clicked "Change All" and found a different result:

 

So, I suspect that you've found a bug. The place to report such bugs is at indesign.uservoice.com, and such bug reports are best accompanied by a screen capture or recording. 

 

But in terms of finding fixes or workarounds, I share Dave Creamer's interest in exactly what we might see your find/change dialog. Are you searching for \s, or do you just whack the spacebar, or do you use some other method of searching for a space? Does it work correctly for you if you specify \s as your "Find what:" query?

Robert at ID-Tasker
Legend
December 3, 2024

@Joel Cherney

 

@Jef.Mod already posted a screenshot.

 

Dave Creamer of IDEAS
Community Expert
Community Expert
December 3, 2024

Can you show a screen shot of your Find/Change dialog box?

 

David Creamer: Community Expert (ACI and ACE 1995-2023)
Jef.ModAuthor
Participating Frequently
December 3, 2024

So here's my Find/Change dialog box, underneath you have the green frame as my base to work, the red frames are the result in the latest version, and in green the result in the previous versions with the exact same inputs.

Robert at ID-Tasker
Legend
December 3, 2024

Why do you use GREP - if you just want to replace spaces? 

 

And what is your end goal? 

 

You can force Paragraph to start in a new frame - Paragraph Style definition, Keep Option / Start Paragraph.

 

Jef.ModAuthor
Participating Frequently
December 3, 2024

This was given as en exemple, I work with text lists and use GREP to remove the numbers or letters or code, or whatever the person used to identify the items in the list, and split each element of the list in separate text frames to lay them on my page.

I will check the option to force paragraphs to start in a new frame, but I just don't understand why this thing that used to work doesn't work anymore ^^