Hi.

In regexp operation,
\v and \V, in contrast with \c, \C, \m and \M, disable the preceding '$' 
(end-of-line) atom.
This seems to be inconsequence.


" matching end-of-line
echo 'hoge' =~# 'hoge$\m'       | " Expect 1, Result 1
echo 'hoge' =~# 'hoge$\M'       | " Expect 1, Result 1
echo 'hoge' =~# 'hoge$\v'       | " Expect 1, Result 0 <- ?
echo 'hoge' =~# 'hoge$\V'       | " Expect 1, Result 0 <- ?

" matching start-of-line
echo 'hoge' =~# '\v^hoge'       | " Expect 1, Result 1
echo 'hoge' =~# '\V\^hoge'      | " Expect 1, Result 1
echo 'hoge' =~# '\m^hoge'       | " Expect 1, Result 1
echo 'hoge' =~# '\M^hoge'       | " Expect 1, Result 1

" with parentheses
" end-of-line
echo 'hoge' =~# '\(hoge$\)'     | " Expect 1, Result 1
echo 'hoge' =~# '\(hoge$\m\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(hoge$\M\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(hoge$\c\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(hoge$\C\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(hoge$\v)'    | " Expect 1, Result 0 <- ?
echo 'hoge' =~# '\(hoge$\V\)'   | " Expect 1, Result 0 <-?

" start-of-line
echo 'hoge' =~# '\(^hoge\)'     | " Expect 1, Result 1
echo 'hoge' =~# '\(\v^hoge)'    | " Expect 1, Result 1
echo 'hoge' =~# '\(\V\^hoge\)'  | " Expect 1, Result 1
echo 'hoge' =~# '\(\c^hoge\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(\C^hoge\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(\m^hoge\)'   | " Expect 1, Result 1
echo 'hoge' =~# '\(\M^hoge\)'   | " Expect 1, Result 1


https://gist.githubusercontent.com/ichizok/ff37b16576321b287b0d/raw/d12eced50f1cdc2b7dcf7648814fd095d931d0a1/regexp-magic-all-after-eol.patch

This patch checks the existence of \v and \V after '$', and sets 'magic_all' 
temporarily.

Thanks.
- Ozaki Kiichi

-- 
-- 
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

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

Raspunde prin e-mail lui