Forum Moderators: coopster
$str = preg_replace("/(-[A-Z])/e","strtolower('\\0')",$string);
/e modifier makes preg_replace() treat the replacement parameter as PHP code after the appropriate references substitution is done.
\\0 or $0 refers to the text matched by the whole pattern.
T