Guest User

Untitled

a guest
Jun 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public string GetStoryTags()
  2. {
  3. List<string> sects = new List<string>();
  4. sects.Add("subSubSection text");
  5. sects.Add("subSection text");
  6. sects.Add("section text");
  7.  
  8. string tags = string.Join(",", sects.ToArray());
  9. Regex r = new Regex("[^a-zA-Z0-9|\\x20|\\-|,]");
  10. tags = r.Replace(tags, "");
  11. Regex r2 = new Regex("\\x20+");
  12. tags = r2.Replace(tags, "-");
  13.  
  14. return tags.ToLower();
  15. }
Add Comment
Please, Sign In to add comment