Skip to main content
Participating Frequently
February 12, 2023
Answered

InDesign GREP Question: Adding Characters Before All Instances of a Word

  • February 12, 2023
  • 1 reply
  • 454 views

I want to add the letter "k" before every instance of my heading 4 style.

I've gone into find/replace and GREP, specified all instances of that character style, and tried to come up with something.

I got as far as something like "(.+?)" or maybe "\w" to search for any word.

Not really sure how to do the replace. Maybe like... "k\w"  or "k$" but they aren't working.

Any ideas?

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

Find what: ^

Change to: k

Find format: The H4 style

 

^ matches the first insertion point of all headings 4 and inserts k.

1 reply

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
February 12, 2023

Find what: ^

Change to: k

Find format: The H4 style

 

^ matches the first insertion point of all headings 4 and inserts k.

Participating Frequently
February 12, 2023

You are a lifesaver. I had to do that for like 500+ instances. Thank you so much! ❤️