Parenthesized portions of a regular expression match can be referred to later!
ie \(match1\).*\(match2\) / \1 \2/
\1 will be replaced with whatever match1 held, and \2 will be replaced with whatever match2 held.
ie
:%s/.* .* \(.*\)/\1/
will remove the first two columns just like in the below blog
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment