js removes the first digit of the string as 0, and returns the number after removing 0

target example

let a="000123456"
let b=a.replace(/\b(0+)/gi,"")
console.log(b)

After processing by the replace() method above, the result is as follows

	b=123456

Pay attention, don't get lost ( _ )

Guess you like

Origin blog.csdn.net/m0_71585401/article/details/131007858