7 Replies Latest reply on May 31, 2012 6:32 AM by Peter Spier

# Find all numbers between 75.0 and 100.0 and applying bold format using GREP

I'm trying to find every number in multiple documents between 75.0% and 100.0% and change their format to bold. Is there a GREP code for this or maybe a scripting code? Thanks!

-J

• ###### 1. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

This should work. Might not be the most elegant, but it gets the job done.

Find:

((8|9\d{1})|(7(5|6|7|8|9))|100)\%

under change, just add your bold to the format field.

1 person found this helpful
• ###### 2. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

Had to change it to this

((8\d{1})|(9\d{1})|(7(5|6|7|8|9))|100)\%

Any idea how to work tenth place decimals into the search? (i.e. 80.8, 99.9, 88.0)

Thanks,

-J

• ###### 3. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

How's this:

((8\d{1}\.*\d*)|(9\d{1}\.*\d*)|(7(5|6|7|8|9))|100)\%

it worked on my sample.

Your search as changed was actually my first soultion, but I tried to consoidate. It worked on all the numbers in my first sample, but failed on the number 88% on my second test.

• ###### 4. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

Perfect! Thank You!

• ###### 5. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

You're welcome. I love GREP puzzles; they're fun, and they give me a chance to build my  skills.

• ###### 6. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

Thanks again! I got a new problem... Would you happen to know how to solve the dilemma below?

I'm trying to add a digit (.0) to the end of several numbers in my InDesign document. Is there a way to do this using a GREP search or some kind of scripting?

Thank you

-J

• ###### 7. Re: Find all numbers between 75.0 and 100.0 and applying bold format using GREP

Let's continue this in the other thread, please.