For example suppose I always have a string that is delimited by \"-\". Is there a way to transform
it-is-a-great-day-today
to
itIsAGreatDayToday
See http://jsfiddle.net/54ZcM/
function camelCase(string) { return string.toLowerCase().replace(/(\-[a-zA-Z])/g, function($1) { return $1.toUpperCase().replace('-',''); }) } alert(camelCase('fOo-BarBA-fo'));