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

Selecting just the subtitle

Return to Member Forum

  • Author
    Posts
    • #33921
      Gert Verrept
      Member

      This is my problem:
      I have a paragraph composed of the words “TITEL (+ a number)”, next is a blank line, next is the subtitle, followed by a blank line.
      What I’m trying to do is, with a grep, to isolate the lines with the subtitle ONLY. In that way we could apply a para or char style to just the selection. I’d like to automate it, because sometimes we got hundreds of those repeating strings in the law texts.
      ex.
      TITEL 2 (followed by rr)

      This is the subtitle (followed by rr) ——> this what should get seletected and changed in another char of para style

      Art. 2

      Any idea’s?

    • #33923

      Usually, situations like these can be solved with a *lookbehind* string in GREP — but you cannot use lookbehind for a text of variable length. So this

      (?<=TITLE.+\r\r).+(?=\r\r)

      will *not* work. But maybe you can do it in reverse:

      1. First apply your subtitle paragraph style to

      ^TITLE.+\r\r.+(?=\r\r)

      2. Then apply your title paragraph style to just

      ^TITLE

    • #33926
      Gert Verrept
      Member

      Jongware,

      Thnks a lot. Works fine. I’m going to try to make it work with the grep query manager, so we can automate it a bit more.
      A shame the variable length doesn’t work.

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