[Ian Jackson]
> Yes, it should be easy if slightly tedious to do with ${...#...} et
> al and sed would be possible too.
Note that I already rewrote it before I included it in Debian.  You
might want to check out the new version in unstable.
Happy hacking,
-- 
Petter Reinholdtsen