I\'m using the regex
System.Text.RegularExpressions.Regex.Replace(stringToSplit, \"([A-Z])\", \" $1\").Trim()
to split strings by capital l
Note: I didn't read the question good enough, USAToday will return "Today"; so this anwser isn't the right one.
public static List SplitOnCamelCase(string text)
{
List list = new List ();
Regex regex = new Regex(@"(\p{Lu}\p{Ll}+)");
foreach (Match match in regex.Matches(text))
{
list.Add (match.Value);
}
return list;
}
This will match "WakeOnBoot" as "Wake On Boot" and doesn't return anything on NMI or TLA