#!/usr/bin/perl -w my $bbl; { local $/; $bbl = <>; } for ($bbl) { s!\\begin\{thebibliography\}\{[A-Za-z0-9]+\}!
!; s!\\end\{thebibliography\}!
!; s!\\bibitem\[([A-Za-z0-9]+)\]\{[^}]+\}!
[$1]
!g; s!
\s*
!
!; s!~! !g; s!\s*\\newblock! !g; s!\{\\em\s([^}]+)\}!$1!g; s!--!-!g; } print $bbl;