Skip to main content
Inspiring
May 18, 2025 4:48 PM UTC
Answered

Stlyle on only one word

What is the easiest way to get every time a specifc word appears to be capitilized (first letter only)?

Eugene TysonCorrect answer
Community Expert
May 18, 2025 5:06 PM UTC

Create a character style and call it's 'Cap first letter' or something similar

 

so then you go to the paragraph style and insert the GREP code and apply the style

 

Style is Cap

code is 

\b(w)(?=ord\b)

 

for whatever word you want - you can replace it like tbps - I think you asked in another thread

so the code would be 

\b(t)(?=bps\b)

 

or if it's concrete

\b(c)(?=oncrete\b)

 

any word you want 

 

if you change the word - say in my example to 'words' or 'wording' then the w reduces back to lowercase, as it no longer matches the string.

 

 

4 replies

Eugene TysonCommunity ExpertCorrect answer
Community Expert
May 18, 2025 5:06 PM UTC

Create a character style and call it's 'Cap first letter' or something similar

 

so then you go to the paragraph style and insert the GREP code and apply the style

 

Style is Cap

code is 

\b(w)(?=ord\b)

 

for whatever word you want - you can replace it like tbps - I think you asked in another thread

so the code would be 

\b(t)(?=bps\b)

 

or if it's concrete

\b(c)(?=oncrete\b)

 

any word you want 

 

if you change the word - say in my example to 'words' or 'wording' then the w reduces back to lowercase, as it no longer matches the string.

 

 

Translate
Inspiring
May 18, 2025 6:03 PM UTC

thanks.

but why wouldn't it be working here?

 

Translate
Community Expert
May 18, 2025 6:40 PM UTC

Take out the full stop in your code - not required anyway 

 

\b(t)(?=bsp\b) is sufficient

 

Translate