Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. static void Main(string[] args)
  2. {
  3. var invalidItemName = "<strong>This is a possible---item Name!<sup>™</sup></strong>";
  4. var notEntirelyFixed =
  5. Regex.Replace(invalidItemName, @"[^0-9a-zA-Z]+", " ").Trim();
  6.  
  7. Console.WriteLine(notEntirelyFixed);
  8. Console.ReadKey();
  9. }
  10.  
  11. // Result: strong This is a possible item Name sup sup strong
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement