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

21545[Clip] Re: continued problems with carriage returns

Expand Messages
  • flo.gehrke
    Feb 18, 2011
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, "John Shotsky" <jshotsky@...> wrote:
      >
      > \R means any combination of CR/LF. \n is line feed, \r is carriage
      > return. (...)
      > When I first started writing clips, I also used \n only, but
      > eventually that got me into trouble, and my whole library had
      > to be converted to use \r\n.

      John,

      Probably, that was due to a syntax change from previous Regex Engine introduced with NT 5.0.

      The What's-new-file for v.5.0 explained:

      "There are significant differences compared to the previous regex syntax used in earlier versions of NoteTab. (...) \n for newline (hex 0A); before it was hex 0D 0A. Replace \n with \r\n."

      One should thoroughly note the meaning of '\R' which was introduced with NT 5.5:

      "Updated the regular expressions engine to the latest release, which is based on PCRE 7.4. The \R newline sequence now matches either CRNL, or a lone CR, or a lone LF."

      Furthermore, it doesn't work in Character Classes and in substring replacements.

      For more details, see Sheri, message #17391, and the whole topic.

      Regards,
      Flo
    • Show all 7 messages in this topic