c# - How do I remove empty space using Regex? -
i have object value save sql database. when run report on sql database, display  
in report. tried cleaning properties in objects before saving them sql using following regex:
regex rgx = new regex("[^a-za-z0-9 - , = % & ( )]"); myobject.description = rgx.replace(myobject.description, "");
the regular expression doing job removing unwanted text. how use regular expression remove  
?
just add string original regex delimited |
regex rgx = new regex(@"[^a-za-z0-9-,=%&()#\s]| ");
Comments
Post a Comment