Skip to main content
Patrick Bruggink
Known Participant
April 4, 2024
Answered

Grep or Nested style

  • April 4, 2024
  • 5 replies
  • 781 views

I want to create a Grep/Nested style within inDesign of this text.
The text up to ___ should always be bold. This can be 1-2-3-4 words, everything after that regular.
And the ___ should be replaced with a space.

 

Submitted:
AADORP___Herv. Aakerk 10.00 ** **.
AAGTEKERKE ZELHEM___Ger. Gem. 18.30 , March 29, 19.00 Rev. A.P. Baaijens
AALBURG ZELHEM ARNHEM___Herv. Reformed Church 10.00 Rev. A.J.

 

This is what I want to have:
AADORP Herv. Aakerk 10.00 ** **.
AAGTEKERKE ZELHEM Ger. Gem. 18.30 , March 29, 19.00 Rev. A.P. Baaijens
AALBURG ZELHEM ARNHEM Herv. Reformed Church 10.00 Rev. A.J.

 

Any ideas?

This topic has been closed for replies.
Correct answer Eugene Tyson

So watched an amazing match last night, crazy goals and scorelines. 

I am back at the computer this morning. 

I have built some basic style for you to copy and follow

The first one has a style setup for you to change yourself

The second one I have the style setup 

 

So on the first one - you can to adjust the Paragraph Style to add the Nested Styles
And then adjust the Underscore character style.

Your Test styles are in a folder called Test.

 

 Attached is your test file to show how it's done.
As noted - you can't delete text with Styles - you can only 'hide' text.

 

Copying and pasting the text to another application or anything like that will copy over the underscores.

5 replies

Patrick Bruggink
Known Participant
April 16, 2024

Thanks! It really helps me.

Patrick Bruggink
Known Participant
April 10, 2024

Is it possible to create an inDesign file and send it to me with the styles in it? I have never worked with Grep/ nested styles so I am searching.

Community Expert
April 10, 2024

I could but watching champions league football at the moment 😂 

 

I made screenshots earlier, follow same as before

Create

2 character styles - bold and underscore

 

On the underscore option leave it as is don't change it have it as basic as when you make it change it later

 

Then in the paragraph style add the nested style

 

Bold up to 1 underscore (type the _)

Underscore up to 1 letter

 

The go to your underscore character style 

Change th colour to none

 

Then reduce the tracking or horizontal scaling until you like it.

 

 

Patrick Bruggink
Known Participant
April 10, 2024

Thanks for the replies. I would like to see this as an automatic process. So I am posting a text like this:

AADORP___Herv. Aakerk 10.00 **.

AAGTEKERKE ZELHEM___Ger. Gem. 18.30 , March 29, 19.00 Rev. A.P. Baaijens

AALBURG ZELHEM ARNHEM___Herv. Reformed Church 10.00 Rev. A.J.

 

And without doing a search and replace o.i.d. I want to get this:

AADORP Herv. Aakerk 10.00 ** **.

AAGTEKERKE ZELHEM Ger. Gem. 18.30 , March 29, 19.00 Rev. A.P. Baaijens

AALBURG ZELHEM ARNHEM Herv. Reformed Church 10.00 Rev. A.J.

Peter Spier
Community Expert
Community Expert
April 10, 2024

Nested styles cannot delete text, only format it. You could minimize it's size by adjsting the horizontal scale to a very small amount and adding some negative tracking while also changing the text color to None, but to actually delete it you must use find/change.

Scott Falkner
Community Expert
Community Expert
April 4, 2024

I would replace the underlines with an End Nested Style Here character then use that as a trigger for the style change.

Community Expert
April 4, 2024

Yeh you can do that too - does the exact same thing. 

Any character that can trigger the nested style would work.

Community Expert
April 4, 2024

If you find and replace the underlines with
_+ 

Then change it to a different type of space - like a Flush Space

~f 

 

 

Then a Nested Style can format the text up to the Flush Space
Only catch here is to Copy the flush space from the text

and paste into the highlighted area

This way - any time you insert a flush space

it will automatically go Bold