The file contains only one line:
four_blank_space + "TE:" + one blank space + "trailers" + one blank space
I write a grouping replace:
:1s/\(\s\+\)\(.\+\):\s\+\(.\{-}\)\(\s\{0,}\)/\2/
I think that :
- The first group
\s\+
will match the four blank spaces at the beginning of the line. - The second group
.\+
will match the stringTE
. :\s\+
will match the string:
betweenTE
andtrailers
.- The third group
.\{-}
will match stringtrailers
. - The last group
\s\{0,}
will match the last white space at the end of the line.
So replace the whole line with the second group, the output should be TE
, but why the result is TEtrailers
?