Regex - Input Checker Class - Lambda with two lists I have an input checker class with some RegExes, and I have converted some of the loops to lambdas. Am I doing it right? They seem to work fine, but I'm new to Lambdas. Does this offer a performance benefit over the commented implementation? Should I try implementing the first one as a lambda, and if so, how? Thanks in advance!
public static class DataChecker
{
    public static bool IsGameInputDataValid(string[] dataFile)
    {
        if (dataFile.Length &lt; 5)
        {
            return false;
        }

        var regexList = new List&lt;Regex&gt;();
        regexList.Add(new Regex(&quot;^\\d\\s\\d$&quot;));
        regexList.Add(new Regex(&quot;^(\\d,\\d )*(\\d,\\d)$&quot;));
        regexList.Add(new Regex(&quot;^\\d\\s\\d$&quot;));
        regexList.Add(new Regex(&quot;^\\d \\d [NESW]{1}$&quot;));
        regexList.Add(new Regex(&quot;^[RLM]{1}( [RLM]{1})*$&quot;));

        //cant figure this one out as lambda... but should it even be converted for performance reasons?
        for (int i = 0; i &lt; 4; i++)
        {
            if (!regexList[i].IsMatch(dataFile[i]))
            {
                return false;
            }
        }

        var listOfMoves = dataFile.Select(x =&gt; x).Skip(4).ToList();
        //instead of:
        // for (int i = 4; i&lt;countOfLinesInInputFile; i++)
        // {
        //     listOfMoves.Add(lines[i]);
        // }

        var areaAnyMoveSequencesInvalid =
            listOfMoves.Select(x =&gt; regexList[4].IsMatch(x)).ToList()
            .Any(y =&gt; y == false);

        if (areaAnyMoveSequencesInvalid)
        {
            return false;
        }

        // instead of:
        // foreach (var line in listOfMoves)
        // {
        //     if (!regexList[4].IsMatch(line))
        //     {
        //         return false;
        //     }
        // }

        return true;
    }
}

edit: Originally I wanted the question to only focus on the lambdas, but I got a lot of responses for the RegExes as well. Therefore I'll add the missing parts to make sense of that. It's a turtle-moving game in 2-dimensional x,y coordinates map.
Sample data file:
5 4
1,1 1,3 3,3
4 2
0 1 N
R M L M M
R M M M
M R M M M M
M R M M
M M M

Rules:
The first line should define the board size
• The second line should contain a list of mines (i.e. list of co-ordinates separated by a space)
• The third line of the file should contain the exit point.
• The fourth line of the file should contain the starting position of the turtle.
• The fifth line to the end of the file should contain a series of moves.
Where:
R: Rotate right
L: Rotate left
M: Move
N,E,S,W: cardinal directions
I've updated the original with d+ instead of d, to allow for multiple digit coordinates:
        regexList.Add(new Regex(&quot;^\\d+\\s\\d+$&quot;));
        regexList.Add(new Regex(&quot;^(\\d+,\\d+ )*(\\d+,\\d+)$|^$&quot;));
        regexList.Add(new Regex(&quot;^\\d+\\s\\d+$&quot;));
        regexList.Add(new Regex(&quot;^\\d+ \\d+ [NESW]{1}$&quot;));
        regexList.Add(new Regex(&quot;^[RLM]{1}( [RLM]{1})*$&quot;));
I would tackle this problem by not adding the last regex to the list but to have this as a separate regex. Using a little &quot;trick&quot; by using Enumerable.Range() you can replace the for with a linq expression like so
if (Enumerable.Range(0, 4).Any(i =&gt; !regexList[i].IsMatch(dataFile[i]))) { return false; }

After the loop you have this line
var listOfMoves = dataFile.Select(x =&gt; x).Skip(4).ToList();  

in which you neither need the call to Select() nor to ToList().
In the next line
var areaAnyMoveSequencesInvalid =
            listOfMoves.Select(x =&gt; regexList[4].IsMatch(x)).ToList()
            .Any(y =&gt; y == false);  

A simple call to Any() would be sufficient but you could just return the value of a call to All() instead like shown below.
If the method in question is called quite often you should consider to use compiled regex. They take a little bit more time to create them but executing them will become faster. If you take this way you should initialize the regexes in the static constructor.
Summing this up will lead to
public static class DataChecker
{
    static DataChecker()
    {
        regexList = new List&lt;Regex&gt;();
        regexList.Add(new Regex(&quot;^\\d\\s\\d$&quot;, RegexOptions.Compiled));
        regexList.Add(new Regex(&quot;^(\\d,\\d )*(\\d,\\d)$&quot;, RegexOptions.Compiled));
        regexList.Add(new Regex(&quot;^\\d\\s\\d$&quot;, RegexOptions.Compiled));
        regexList.Add(new Regex(&quot;^\\d \\d [NESW]{1}$&quot;, RegexOptions.Compiled));

        lastRegex = new Regex(&quot;^[RLM]{1}( [RLM]{1})*$&quot;, RegexOptions.Compiled);
    }
    private static readonly List&lt;Regex&gt; regexList;
    private static readonly Regex lastRegex;
    public static bool IsGameInputDataValid(string[] dataFile)
    {
        if (dataFile.Length &lt; 5) { return false; }

        if (Enumerable.Range(0, 4).Any(i =&gt; !regexList[i].IsMatch(dataFile[i]))) { return false; }

        return dataFile.Skip(4).All(x =&gt; lastRegex.IsMatch(x));
    }
}

Without knowing what the input looks like I can't come up with a better name for the last regex. In addition this isn't tested but should work like a charme.