Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Text.RegularExpressions;
- namespace remore_characters_from_string
- {
- class Program
- {
- static void Main(string[] args)
- {
- string str = "Something @to ,Write.;';";
- str = new string((from c in str
- where char.IsWhiteSpace(c) || char.IsLetterOrDigit(c)
- select c
- ).ToArray());
- Console.WriteLine(str);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment