<?php $s = '123_abc____def'; var_dump( preg_replace( '/\_+[a-zA-Z]{1}/e', '_' . strtoupper('\\1'), $s) );
You have javascript disabled. You will not be able to edit any code.