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

Re: regular expression question

Expand Messages
  • Kalle Bjorklid
    ... Vim is able to do multiline regex-searches (i think this is a new feature in 6.0). example of the case you described: Searching a buffer like this: aaa bbb
    Message 1 of 2 , Nov 1, 2001
    • 0 Attachment
      On Thu, 1 Nov 2001, Jonah wrote:

      > vim help lists the meta-character "\_$" as "end of line, used anywhere",
      > as distinct from "$", the normal end of line meta-character.
      >
      > Since VIM searches line by line (I think), I'm confused about when,
      > even hypothetically, you could search for an end of line character
      > other than actually at the end of a line.

      Vim is able to do multiline regex-searches (i think this is a new feature
      in 6.0).

      example of the case you described:
      Searching a buffer like this:
      aaa
      bbb
      with an expression like this:
      a$\_.b
      does NOT find a match, while an exprssion like this:
      a\_$\_.b
      does match.

      note that '\n' is a synonym (I think) to '\_$\_.', since the next
      character after the "logical" line has ended is bound to be the
      newline-char (but, of course, this won't match to EOF)

      --
      "Kalle" Karl-Mikael Bjorklid
      E-Mail: bjorklid@...
      Work-related: kalle.bjorklid@...
      WWW: www.cc.jyu.fi/~bjorklid/
    Your message has been successfully submitted and would be delivered to recipients shortly.