3

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"

0

1 Answer 1

3

This is the GREP:

\d{3}(?!\sct)

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

1
  • 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 that you have read and understand our privacy policy and code of conduct.

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