Nikolaos A. Patsopoulos wrote:
Hi,
another two questions:
1. I want to delete all text that has a specific pattern. I use the
following code with s command but I want to keep the \a character in the
beginning:
:%s/\a,\_.\{-}<\/td><\/tr>/
To delete everything that matches a certain pattern
:%s/pattern//g
(i.e., replace by nothing). To keep something at the start, see
:help /\zs
:help /\@<=
2.
how can I join lines that have non-numerical characters?
e.g.
153
Purdue
Canc Ct
1256
should be
153
Purdue Canc Ct
1256
Thanks in advance,
Nikos
(untested)
:%g/\D.*\n.*\D/join
i.e. join two successive lines, adding an intervening space, if there is
at least one non-digit anywhere in each of them.
Best regards,
Tony.