Take a string such as:
In C#: How do I add \"Quotes\" around string in a comma delimited list of strings?
and convert it to:
C#
public string toFriendly(string subject) { subject = subject.Trim().ToLower(); subject = Regex.Replace(subject, @"\s+", "-"); subject = Regex.Replace(subject, @"[^A-Za-z0-9_-]", ""); return subject; }