• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GREP Style for end of paragraph word OR after character

New Here ,
Apr 23, 2024 Apr 23, 2024

Copy link to clipboard

Copied

I am horrible with coding (GREP).

Would anyone know how to either make this text (sale price) be applied with a character style? When I go to apply a Paragraph style, I either the ending word of the paragraph to have a style, or have it to run after a certain character. I'll include the attachment of how I want it (circled text). After all, I am horrible with coding. Maybe I can learn something!
Thanks!

Capture.PNG

TOPICS
How to , Print , Scripting

Views

164

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 23, 2024 Apr 23, 2024

\$\d+?\.\d{2}

 

It's all wild cards

\$ is a dollar sign the slash 'escapes' the $ which is used for signaling other thing with GREP - so basically means $ literally

\d is a digit

. on it's own is any character - so \. where the slash escapes the . means the actual dot

\d is a digit

{2} is two times

 

In the item code  paragraph style - go to the GREP Nested Style

Insert the code

Select the Character Style for price - if you don't have you you can create one there.

 

https://redokun.com/blog/grep-indesign

...

Votes

Translate

Translate
Community Expert ,
Apr 23, 2024 Apr 23, 2024

Copy link to clipboard

Copied

\$\d+?\.\d{2}

 

It's all wild cards

\$ is a dollar sign the slash 'escapes' the $ which is used for signaling other thing with GREP - so basically means $ literally

\d is a digit

. on it's own is any character - so \. where the slash escapes the . means the actual dot

\d is a digit

{2} is two times

 

In the item code  paragraph style - go to the GREP Nested Style

Insert the code

Select the Character Style for price - if you don't have you you can create one there.

 

https://redokun.com/blog/grep-indesign

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2024 Apr 23, 2024

Copy link to clipboard

Copied

Eugene, looks like you have an extra { before the two...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2024 Apr 23, 2024

Copy link to clipboard

Copied

Thanks, fixed.
It takes a village 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 24, 2024 Apr 24, 2024

Copy link to clipboard

Copied

LATEST

Wow! Thank you. It makes sense after your explanation. Appreciate your help and it works perfectly!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines