Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- var invalidItemName = "<strong>This is a possible---item Name!<sup>™</sup></strong>";
- var notEntirelyFixed =
- Regex.Replace(invalidItemName, @"[^0-9a-zA-Z]+", " ").Trim();
- Console.WriteLine(notEntirelyFixed);
- Console.ReadKey();
- }
- // Result: strong This is a possible item Name sup sup strong
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement