This seems simple, but I can't figure it out.

I have some input I don't control with a lot of properties that look like 
"xx-yyy" that I want to camelcase: "xxYyy" and I'd like to do this with a 
one-line replace() instead of a longer split/join approach. I've tried several 
variations of:


var s:String = t.replace(/-([a-z])/g, "$1".toUpperCase());


I've also tried making the second param a function that returns uppercase, but 
replace() doesn't do the group substitution in this case.

Can this be done?

Reply via email to