how to replace all the zeros in javascript : How can I replace all the zeros in a javascript variable, I have some variables like this one:

var a = 00000004567,

and I need to replace the zeros with *, I'm using :

    a.replace(/0*\d/g,'*')

the problem is that it returns -> ****567

Thanks