CSharp examples for System.Text.RegularExpressions:Split String
Split Camel Case with regex
using System.Text.RegularExpressions; using System.Linq; using System.Collections.Generic; public class Main{ // http://stackoverflow.com/a/5796793 public static string SplitCamelCase(this string str) {//w ww. j a v a 2s .c o m return Regex.Replace( Regex.Replace( str, @"(\P{Ll})(\P{Ll}\p{Ll})", "$1 $2" ), @"(\p{Ll})(\P{Ll})", "$1 $2" ); } }