Last active
August 30, 2017 16:48
-
-
Save 5up3rman/546a0bb29cc40acbb4b5bf3e59de991f to your computer and use it in GitHub Desktop.
Flawed Item Renaming - Really Basic Regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
var wildItemName = "<strong>Name of a Product<sup>™</sup>Version 1</strong>"; | |
var notEntirelyFixed = | |
Regex.Replace(wildItemName, @"[^0-9a-zA-Z]+", " ").Trim(); | |
Console.WriteLine(notEntirelyFixed); | |
Console.ReadKey(); | |
// Result: strong Name of a Product sup sup Version 1 strong | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment