I want to add a space to a string on capital letters using a PHP method like preg_replace() and a regex, but I only want to add a space on the first capital letter
preg_replace()
Find:
(?<!^)((?<![[:upper:]])[[:upper:]]|[[:upper:]](?![[:upper:]]))
Replace:
$1
note the space before $1
Edit: fix.