I'm trying to fix a file in the following format :
5,329;
1999;
<a> Univ Washington</a>;
695;
2001;
NHLBI;
684;
1998;
<a> Stanford Univ</a>;
3,537;
1998;
La Jolla Inst Allergy & Immunol;
3,333;
1996;
<a> BRIGHAM & WOMENS HOSP</a>;
2,967;
1998;
<a> Northwestern Univ</a>;
2,936;
2002;
<a> NHLBI</a>;
2,695;
1996;
<a> ST JUDE CHILDRENS HOSP</a>;
2,581;
1998;
<a> Merck Res Labs</a>;
into this:
5,329;1999;<a> Univ Washington</a>;
695;2001;NHLBI;
684;1998;<a> Stanford Univ</a>;
3,537;1998;La Jolla Inst Allergy & Immunol;
3,333;1996;<a> BRIGHAM & WOMENS HOSP</a>;
etc...
Do I understand that you're just joining groups of three lines?
:g/^/,+2j!
will do the trick, if that's the case...If not, your regexp could
be tweaked, so let me know and I'll tweak it too. however, given
your examples, the above command seems to do what you want.
-tim