On Wed, Oct 15, 2008 at 18:40, Max Hetrick <maxhetrick at verizon.net> wrote: >> html2wiki --dialect MoinMoin my_file.html | sed '/^=/s/==\(=*\)/\1/g' > > That changes all the headings to = Title 1 =. No it doesn't. It removes two "=" from each line that starts with a "=" (i.e. is a title line). So it transforms === title 3 === into = title 1 = ==== title 4 ==== into == title 2 == ===== title 5 ===== into === title 3 === Wasn't that what you needed? Filipe