2 Replies Latest reply on Dec 16, 2014 2:41 PM by ChromaSun

    GREP - Exclude Period from Selection

    ChromaSun

      Hello,

       

      I have been fighting with an expression for a while now. I have a document that formatted poorly when being pasted into InDesign, with every line ending in a carriage return. I am trying to find an expression that selects all carriage returns except those preceded by a period.

       

      grep_period_carriage_question.jpg

       

      The image above illustrates what I am trying to select. I am unfortunately still fairly new to GREP, but have attempted a few expressions, none of which have wanted to cooperate.

       

      [^\.]~b will successfully ignore the period, however, also results in it selecting the previous character:

      grep_period_carriage_question_02.jpg

       

      If anyone may be able to provide assistance on the correct expression to use, it would be very much appreciated.

       

      Thank you.