I could give you some perl to do it, but it's ugly.