Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

GREP – Ignore / Skip particular word from search

Return to Member Forum

  • Author
    Posts
    • #64608
      Masood Ahmad
      Participant

      Is there any way we can skip a particular word from being searched using the GREP. For example, in a given paragraph, I would like to select only letters [\u] but also want to ignore numbers and words like “and” “or” “but” etc. I then want to apply character style or replace with something else.

      Any idea….

    • #64615
      Justin Sligh
      Member

      Masood,

      I am not sure if you can create a single Grep Style this. You could do it with two Grep Styles:

      Grep Style 1 – Use the following expression:
      \w
      The associated Character Style will control all words.

      Grep Style 2 – Use the following expression:
      (the|or|and)
      The associated Character Style can reset those letters to whatever you want.

      Not sure how to handle this with regard to Find/Replace.

      I would like to know if you find a way to handle it within one Grep Style.

    • #64623
      Masood Ahmad
      Participant

      Any help …..

    • #64626
      David Blatner
      Keymaster

      Can you give a specific example of a sentence you want to find or format? I don’t understand it.

    • #64628
      Masood Ahmad
      Participant

      There is no specific text I can give you right now, for instance you can take any text…

      ABC is a US-owned company with over 40 years experience in the creative industries. The company is ISO 9001 certified and employs over 600 designers, graphics artists and editorial production staff at 3 studios in India.

      In the above given text I would like to ignore digits and words like “and”, “ISO” and apply a character style (Bold) to the remaining.

      The idea behind this is that I want to know whether it is possible to skip any particular text using GREP or not.

    • #64630
      David Blatner
      Keymaster

      Hm. Interesting. I remembered this interesting article: https://creativepro.com/grep-solution-to-flawed-title-case-feature.php
      Perhaps that grep code would help. But I’m stuck trying to figure out how.

    • #64631
      Masood Ahmad
      Participant

      Thanks David, I will try to figure out something from Peter’s expression. Once again Thanks.

Viewing 6 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads