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 query:find multiple carriage returns, but NOT a page break, column break

Return to Member Forum

  • Author
    Posts
    • #14339313
      Godfried Vonk
      Participant

      I want to find multiple carriage returns before a page break (or other break), to delete them. But the query \r\r+ (or ~b~b+, or \v\v+) also includes the page break, obviously that’s not what I want. Positive lookahead doesn’t work: \r\r+(?=~P) excludes the page break, but finds max. 5 returns… (Why?)
      Does anyone have a clue?

    • #14339343
      Dhafir Photo
      Participant

      Try this:
      (?s)~b+(?=\r)

    • #14339345
      Godfried Vonk
      Participant

      +(?=\r) does the thing!

    • #14339346
      Godfried Vonk
      Participant

      Although it also finds multiple carriage returns that are not followed by a break, so it is not very specific.

    • #14339357

      1/
      Find ~P
      Apply a condition

      2/
      Find ^\r+ without condition
      Replace by nothing

      3/
      Find \r(?=\r)
      Replace by nothing

      4/
      Find condition
      Replace by “no condition”

      Of course, using a queries launcher, you just need “1 click”!

      (^/) The Jedi

    • #14339360
      Godfried Vonk
      Participant

      Thanks! I see that these in-between-steps are necessary.

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