I have a following line:
<a href="/episodes/show-invisibles/"> Show invisibles: http://vimcasts.org/episodes/show-invisibles/
..and I have a :s/\v^[^\>]+\>\s//g
substitution command which changes this line to:
Show invisibles: http://vimcasts.org/episodes/show-invisibles/
As I understand the regular expression of this substitution, then ^[^\>]+\>\s
part will match one or more whatever character(except >
) from the beginning of the line until >
and whitespace character appear. However, why is the \v
needed? According to vim manual:
Use of "\v" means that in the pattern after it all ASCII characters except
'0'-'9', 'a'-'z', 'A'-'Z' and '_' have a special meaning. "very magic"
However, why is this needed in this particular case?
[^\>]
means except '\' and '>', even with\v
. – Antony Aug 5 '16 at 11:24