I have following code to replace left spaces with a specific string but, It is not working as I want.
console.log(' asdadasdad as asdasd asasd'.replace(/^s+/, 'x'))
See Question&Answers more detail:osI have following code to replace left spaces with a specific string but, It is not working as I want.
console.log(' asdadasdad as asdasd asasd'.replace(/^s+/, 'x'))
See Question&Answers more detail:os