vim match a mark in regexp

Viewed 101

In gvim (v8) regexp we can specify a point in the selected region with \%V, e.g. s/\%Vabc/xyz/. However, \%V matches anywhere in the selection, I want something to match only at the beginning or end of the visual-selection (marks <,>).

Moreover this regexp /\%V\_.*\%V/ doesn't select the final character of the region. \%V is supposed to be zero-width?

So how can I specify the position of a mark, as in:

:s/\mark(<).\zs(abc)\ze\mark.(>)/xyz/`

1 Answers
Related