If my input string is ~!@#$%^&*()_+{}:\"<>?
How do I get the count of each special character using Regex? For example:
Regex.Match
The non-regex way (which sounds much easier) it to make a list of characters you want to check and use Linq to find the count of those characters.
string inputString = "asdf1!%jkl(!*";
List charsToCheckFor = new List() { '!', '@', '#', ..... };
int charCount = inputString.Count(x => charsToCheckFor.Contains(x));
I am making you write in all the characters you need to check for, because you need to figure out what you want.