Skip to main content
Inspiring
June 14, 2017
Answered

Skipping words with GREP

  • June 14, 2017
  • 1 reply
  • 362 views

Hello Community,

I am working on a document where i am using  GREP styles. My GREP expressions highlight anything that I do not want to italicize in red (for visual reference). However, they are including any words that have "spl" in it as seen in screenshot below. I only want the single word "spl" or "spl." to be highlighted and others that I have specified. How can I make the GREP expressions skip any words that have "spl" in them? Thank you for any assistance.

    This topic has been closed for replies.
    Correct answer winterm

    This will find spl and spl.

    \bspl\b\.?

    This won’t bother about case, so positives are:

    spl, spl., Spl, Spl., SPL, SPL. etc.

    (?i)\bspl\b(?-i)\.?

    1 reply

    winterm
    wintermCorrect answer
    Legend
    June 14, 2017

    This will find spl and spl.

    \bspl\b\.?

    This won’t bother about case, so positives are:

    spl, spl., Spl, Spl., SPL, SPL. etc.

    (?i)\bspl\b(?-i)\.?