Loading ...
Sorry, an error occurred while loading the content.

19082Re: [Clip] Re: Handling periods at ends of lines

Expand Messages
  • Sheri
    Apr 9, 2009
    • 0 Attachment
      Flo wrote:
      > --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      >> Thank you again, I was still missing how the dot was working when
      >> looking at the clip and looking at my sample....
      >>
      >
      > John,
      >
      > Let me first try again to clear the job you want to do.
      >
      > My test lines are...
      >
      > This is an example line without a period
      > Another line with a period.
      > This is an example line with a period.
      > Another line without a period
      > This is an example line without a period
      >
      > I understand that you want to add a period to line #1 and #5 only. That is, to lines which (a) contain the sample string "This is an example line", and which (b) don't end with a period.
      >
      > So here's another proposal which combines Sheri's approach with the sample string...
      >
      > ^!Replace "^(This is an example line.*)[^\r\n.]\K$" >> "." AWRS
      >
      > It adds a period to line #1 and #5 only. The rest is ignored. Is this the job you want to do?
      >
      > Maybe I misunderstood the whole issue and you want to add a period to ANY line that doesn't end with a period. In this case, Sheri's proposal...
      >
      > ^!Replace "[^\r\n.]\K$" >> "." AWRS
      >
      > would the job, of course.
      >
      > Flo
      >
      >
      Hi Flo,

      Seems I'm guilty of not reading the notes very closely, and looking only
      at the original sample, which sadly did not include any lines that
      shouldn't be altered. I was trying to help when I really didn't have
      time to scrutinize the messages.

      Now I see that he did say: "there are many [...] lines that are not
      sentences and should never get a period added"

      Regards,
      Sheri
    • Show all 23 messages in this topic