regex - Vim formula to leave only two first words in each line -
regex - Vim formula to leave only two first words in each line -
how leave 2 first words (remove rest) in each line in vim?
e.g.
aa aa subst:pl:acc:m3+subst:pl:acc:n2 aa advertisement acta brev:npun
into
aa aa aa advertisement
applied lines:
:%s/\v^(\s*\s+\s+\s+).+/\1/
regex vim replace
Comments
Post a Comment