19
1
using System;
2
using System.Text.RegularExpressions;
3
4
using System.Linq;
5
6
public class Program
7
{
8
public static void Main()
9
{
10
string[] animals = {"Cat", "Alligator", "fox", "donkey", "Cat", "alligator"};
11
12
var animalsWithCapitalLetter = animals.Count(s =>
13
{
14
return Regex.IsMatch(s, "^[A-Z]");
15
});
16
17
Console.Write(animalsWithCapitalLetter);
18
}
19
}
Cached Result
Player One is parzival
They have a score of 0
They have a score of 0