How would I convert Hello World
to helloWorld
?
Currently trying:
'Hello World'.replace(/\b ([A-Z]?)/g, function(v) { console.log(v);return v.toLowerCase(); }) })
I.e., plan is to match 'word boundary, space, uppercase letter' and then replace with lowercase equivalent. The above has some bugs though...