/ Id-Extras Forum / Beginning of cell in table

  • Author
  • #8044 Reply
    Yosef Wexler

      Is there a way to search for a paragraph mark at the beginning of a cell? I have a table in InDesign and in a few places the author inserted an extra paragraph mark at the beginning of a cell and I’m trying to find a GREP to erase all of them.

      #8045 Reply
      Ariel
      Keymaster

        I don’t think there’s a way, with GREP, to specify the beginning of a cell, unfortunately.

        You can, of course, specify the beginning of a story, so if you wanted to delete all empty paragraphs at the beginning of a story (and this should include the beginning of cells), you could do that.

        It would also be fairly simple to write a script to apply a certain attribute to all text in all cells (e.g. strike through, which you’re probably not using), and then to search for empty paragraphs that have that attribute applied….

        The GREP to find a paragraph at the beginning of a story (including at the beginning of a cell) is

        \A\r

        #8046 Reply
        Yosef Wexler

          Thank you Ariel.

          I hadn’t seen your response and I came up with the following:

          (?<!.)\r

          In other words, end of paragraph with a negative look behind of any character, which will find every paragraph mark at the beginning of a story.

          #8050 Reply
          Ariel
          Keymaster

            Good. But the \A locator specifically signifies the beginning of a story (c.f. \z — the end of a story).

          Viewing 4 posts - 1 through 4 (of 4 total)
          Reply To: Beginning of cell in table
          Your information: