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

GREP and or Script Help for applying style to only range of number and %

New Here ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

I want to be able to apply my paragraph style to a range of numbers. BUT, I also want to apply it to the % sign that is associated with ONLY the numbers in that range. For instance I want anthing that is less than or equal to 25% to use my pargraph style. I was able to use a GREP that worked for the number range but I need the percent sign to only be the style when it fits in that range. Is this possible?

 

I also would ideally like to be able to use this in a data merge document. Is there a script for this?

TOPICS
How to , Scripting

Views

119

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 , Jun 08, 2022 Jun 08, 2022

To be able to apply it automatically when using Datamerge you will need to use a GREP Style in your main paragraph style that will apply a character style to number from 0% to 25%.

You can do this using:

\b(\d|1\d|2[1-5])\b\h?%

 

Votes

Translate

Translate
Community Expert ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

To be able to apply it automatically when using Datamerge you will need to use a GREP Style in your main paragraph style that will apply a character style to number from 0% to 25%.

You can do this using:

\b(\d|1\d|2[1-5])\b\h?%

 

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 ,
Jun 08, 2022 Jun 08, 2022

Copy link to clipboard

Copied

LATEST

Thank you!!

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