adfa.ad.asdf.efa.saf mark
I need to match the saf mark
, no more no less ahead.
I find that if I use this,
/\v[,.;]\zs.{-}mark
It matches all along to the first .
. Any suggestions? Thanks.
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communityadfa.ad.asdf.efa.saf mark
I need to match the saf mark
, no more no less ahead.
I find that if I use this,
/\v[,.;]\zs.{-}mark
It matches all along to the first .
. Any suggestions? Thanks.
To my knowledge when there is a race between two goals (in this case "find the first match for the expression" vs. "find the match with the least characters"), the first goal wins.
So depending on what matches you need for which lines (always the part after the last punctuation before the mark
?) you could move the greedy part in front:
/.*[,.;]\zs.*mark
Again, the first goal wins, so the second *
only gets what the first one leaves