I receive the same output and the leading zeroes are not removed from the file . Please let me know how to achieve this and also the reson for which the above command is not working
Well, the reason the command doesn't work is because POSIX recognizes just two regex flavors - BREs (Basic Regular Expressions) and EREs (Extended Regular Expressions), and POSIX programs support one flavor or the other.
sed supports BREs. The quantifiers "+" and "?" are metacharacters of EREs, and hence they are not supported by sed.