Monday, March 6, 2017

Re: Ambiguity about what $ means?

Shawn Corey wrote:

> On Mon, 6 Mar 2017 08:01:58 -0800 (PST)
> Ben Fritz <fritzophrenic@gmail.com> wrote:
>
> > But, you can still match end-of-line in the middle of a pattern using
> > "\n".
>
> No, that matches a new-line character. The difference is that $ matches
> the end of the line, not a character. This is called an anchor.
>
> "Anchors are a different breed. They do not match any character at all.
> Instead, they match a position before, after, or between characters."
> http://www.regular-expressions.info/anchors.html

Using '\n' does not match a character.

Don't try to apply terminology from some other regexp engine to Vim, it
will just confuse you. In Vim terminology there is no anchor.

--
hundred-and-one symptoms of being an internet addict:
72. Somebody at IRC just mentioned a way to obtain full motion video without
a PC using a wireless protocol called NTSC, you wonder how you never
heard about it

/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

--
--
You received this message from the "vim_use" 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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment