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

[^\n] explicitly matches newline

Expand Messages
  • Timo Frenay
    Including n in a character class makes it match newline, but this is true even if it is a negated character class. Thus, the paradoxical / n &[^ n]/ does
    Message 1 of 2 , Jan 8, 2013
    • 0 Attachment
      Including \n in a character class makes it match newline, but this is
      true even if it is a negated character class. Thus, the paradoxical
      /\n\&[^\n]/ does match, and including \n in a negated character class
      that otherwise doesn't match newline, makes it match newline anyway.
      This is true for both actual newline in a string and end-of-line in a
      buffer.

      Greets,
      Timo Frenay.

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Christian Brabandt
      ... Yes, this is in the todo list and there is a patch pending: https://groups.google.com/d/topic/vim_dev/DzJ7ZzYlzQI/discussion regards, Christian -- You
      Message 2 of 2 , Jan 8, 2013
      • 0 Attachment
        On Tue, January 8, 2013 11:26, Timo Frenay wrote:
        > Including \n in a character class makes it match newline, but this is
        > true even if it is a negated character class. Thus, the paradoxical
        > /\n\&[^\n]/ does match, and including \n in a negated character class
        > that otherwise doesn't match newline, makes it match newline anyway.
        > This is true for both actual newline in a string and end-of-line in a
        > buffer.
        >

        Yes, this is in the todo list and there is a patch pending:
        https://groups.google.com/d/topic/vim_dev/DzJ7ZzYlzQI/discussion

        regards,
        Christian

        --
        You received this message from the "vim_dev" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.