Well, you'll need to specify spaces [red]or tabs[/red] in the sed commands like so
[tt]sed 's!^[ (tab)]*!!;'[/tt]
and so on. Substitute [tt]" *"[/tt] with "[tt][ (tab)]*[/tt]" in PHV's example. For sed, you'll need to type the tab character literally as it doesn't understand \t.
[xyz]* means any number of the characters inside the brackets
HTH,
p5wizard