I'm trying to check if there are 4 symbols in a row in a string
For example
abcde/-*,f€gh
I want to match if there is /-*,
but the symbols can change to any non-letter, non-digit or non-space
I'm trying to check if there are 4 symbols in a row in a string
For example
abcde/-*,f€gh
I want to match if there is /-*,
but the symbols can change to any non-letter, non-digit or non-space
I think this oughta just do it:
([^a-zA-Z0-9\s]){4,}
Can use it like so:
Console.WriteLine(Regex.Match("abcde/-*,f€gh", @"([^a-zA-Z0-9\s]){4,}").Success); // Prints True
Console.WriteLine(Regex.Match("abcde/- *,f€gh", @"([^a-zA-Z0-9\s]){4,}").Success); // Prints False