Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
remove special char
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string str = "$c!sh$arp&st%ar"; Console.WriteLine(RemoveSpecialChars(str)); } } public static string RemoveSpecialChars(string str) { // Create a string array and add the special characters you want to remove string[] chars = new string[] { ",", ".", "/", "!", "@", "#", "$", "%", "^", "&", "*", "'", "\"", ";", "_", "(", ")", ":", "|", "[", "]" }; //Iterate the number of times based on the String array length. for (int i = 0; i < chars.Length; i++) { if (str.Contains(chars[i])) { str = str.Replace(chars[i], ""); } } return str; } } }
run
|
edit
|
history
|
help
0
Watch Jurassic World Dominion Online Free
Selection Sort
Use Lock Keyword
Project Euler Problem 9
p link gener tor
Reflection constructors
derfgtredwcdf
Xamarin
Reed Solomon Demo
Tarkov Time