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 replace:

Tagged: ,

Return to Member Forum

  • Author
    Posts
    • #100803
      Pat Morita
      Member

      Hi!

      I want to remove lines from anywhere in the document that contain a specific string. Let’s say i have a text

      Hello my Name is
      Pat Morita and I can
      not solve the secrets of grep

      I want to remove the middle line containing “Morita” so the text reads

      Hello my Name is
      not solve the secrets of grep

      It’s important that the grep keeps the kind of linebreak set (e.g. soft linebreak) to not kill any styling -> And that’s where i struggle

      Any help appreciated

    • #100806
      Graham Park
      Member

      Pat
      I am not sure what line-breaks you are having trouble with.
      This GREP will find the whole line including the line break and remove it. The previous line is unaffected and the same for the following.

      Find
      .+Morita.+\r
      Replace
      NONE

    • #100816
      Vinny –
      Member

      Hi,
      What about this?
      Find
      .*Morita.*\v?
      Replace by nothing

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