Perhaps I just hit the point where i; m overthinking it, but I'm wondering: is there a way to assign a list of special characters that should all be considered delimiters, and then split the string using this list? Example:
"battlestar.galactica-season 1"
must be returned as
battlestar galactica season 1
I think about regex, but at the moment I'm a little excited, looking at him for too long.
EDIT: Thanks guys, confirming my suspicion that I was overdoing this LOL: here's what I ended up with:
string[] tempString = fileTitle.Split(@"\/.-<>".ToCharArray());
fileTitle = "";
foreach (string part in tempString)
{
fileTitle += part + " ";
}
return fileTitle;
I suppose I could just replace the delimiters with "" spaces ... I will choose the answer as soon as the timer is set!