We\'re trying to generate user friendly looking report names from SSRS Report filenames, these can\'t have spaces in the name but it should be possible to generate them from
Edit 2 fixed IEE
var input = @"WeeklyIEEReportWC20090103SortedByDate";
string p = @"(?<=[A-Z])(?=[A-Z][a-z])|(?<=[a-z0-9])(?=[A-Z])|(?<=[a-zA-Z])(?=[0-9])";
string value = Regex.Replace(input, p, " ");
produces Members Of IEE Team
and Weekly IEE Report WC 20090103 Sorted By Date
for the samples provided.
My interpretation and solution:
var input = "WeeklyIEEReportWC20090103SortedByDateXFoo3W3CBar4x";
var re = @"(?!^)(?:[A-Z](?:[a-z]+|(?:[A-Z\d](?![a-z]))*)|\d+)";
string value = Regex.Replace(input, re, " $0");
Result: Weekly IEE Report WC20090103 Sorted By Date X Foo 3 W3C Bar 4x