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

help with grep style

Return to Member Forum

  • Author
    Posts
    • #63093

      I've got a document with paragraphs like:

      This is a sentence. This is a sentence. This is a sentence. This is a sentence. Last phrase with no period

      I want to apply a character style to the last phrase at the end of the paragraph.

      This grep:

      (?<=.).*?(?=r)

      applies the style to all the sentences.

      Is there a way to style just the “Last phrase with no period”?

      Any help greatly appreciated.

    • #63095

      Untested, but you could try this:

      [^.]+$

      i.e., any longest possible run at the end of a paragraph that does not contain a period.

    • #63104

      Works perfectly. Thanks very much Jongware.

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