将the-first-name经过处理之后变成小驼峰式写法theFirstName
// 将the-first-name经过处理之后变成小驼峰式写法theFirstName var reg = /-(\w)/g; var str = 'the-first-name'; console.log(str.replace(reg, function($, $1) { return $1.toUpperCase(); }));...