Regex:
http://weblogs.asp.net/jgalloway/archive/2005/09/27/426087.aspx
http://stackoverflow.com/questions/773303/splitting-camelcase
(probably the best - see the second answer)
http://bytes.com/topic/c-sharp/answers/277768-regex-convert-camelcase-into-title-case
To convert from UpperCamelCase to
Title Case, use this line :
Regex.Replace("UpperCamelCase",@"(\B[A-Z])",@"
$1");
To convert from both lowerCamelCase
and UpperCamelCase to Title Case, use
MatchEvaluator : public string
toTitleCase(Match m) { char
c=m.Captures[0].Value[0]; return
((c>='a')&&(c<='z'))?Char.ToUpper(c).ToString():"
"+c; } and change a little your regex
with this line :
Regex.Replace("UpperCamelCase or
lowerCamelCase",@"(\b[a-z]|\B[A-Z])",new
MatchEvaluator(toTitleCase));