You could fix your original code less invasively with
s/(?<!^)([A-Z])/ $1/g;
But [A-Z] only works for English, at most, and should be avoided.
s/(?<!^)(\p{Upper})/ $1/g;
Makeshifts last the longest.
In reply to Re^2: Insert Space between names
by Aristotle
in thread Insert Space between names
by steelrose
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |