For example
:echo matchstr("foo\nbar", '^foo$')
matches nothing.
I don't see anything in the matchstr() help indicating that it treats start-of-line and end-of-line any differently. I tried \_^ and \_$ as well. Is this a bug?
David
--
--
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 a topic in the Google Groups "vim_use" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vim_use/eX0WwxcMj8o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
You do not have multiline string here. See :h NL-used-for-Nul: regex engine always assumes that newline character is a mere replacement for zero byte and newline is always represented by a string end. Which is true for buffers. Not for buffers there is only `readfile()`/`getline(start, end)` format (which is a list of lines where newlines are used for nuls) which match* functions, substitute(), =~# and so on do not understand.
>
> David