GREP – Ignore

Learn / Forums / General InDesign Topics / GREP – Ignore

Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #77656
      Chris Haynes
      Member

      Hello all

      I would like to know how you can do a GREP search that would look for any white space ((Zero or More times)*?) but to ignore a Forced Line Break

      I tried \s*?^[\n] or \s*?^(\n) or \s*?^\n

      Any help much appreciated

    • #77657
      David Blatner
      Keymaster

      In the find/change dialog box, choose “Multiple Space to Single Space” from the Query popup menu. Then replace the {2,} with a + (for “one or more times”) or * (for zero or more times)

    • #77661
      Chris Haynes
      Member

      Thanks David that would help me to solve the problem – However I have just had a Eureka moment …

      So my target was to define “find any white space except a forced line break” as part of a wider find / change:

      I want to find all instances of a pipe “|” and make sure that it is surrounded by a space on both sides – ” | ”
      I do not want to select a forced line break if there is one

      So I did this = (?<=.)\s*?\|\s*?(?=\n*\w) and replace with ” | “

Viewing 2 reply threads
  • You must be logged in to reply to this topic.
>