I'm trying to set up a GREP style that will style a 3 digit code (example 789) but not apply that style when the code is followed by the characters ct.

So the style would apply to the 100 in "100 Halo" but not to the 120 in "120 ct"


1 Answer 1


This is the GREP:


All the numbers \d repeated three times {3} (excepting those ?! followed by a space \s and the characters ct )

  • So, if the text "Happy new year 2019" occurs, 201 will be styled. Is this OK for the OP? ;-)
    – Vinny
    Nov 5, 2018 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.