Robbers: Crack the regex - Make a snake This is the robber's thread. The cop's thread is here.



A snake matrix is a square matrix that follows this pattern:

3-by-3:

1  2  3
6  5  4
7  8  9


and 4-by-4:

1  2  3  4
8  7  6  5
9  10 11 12
16 15 14 13


Your task is to write a code that takes an input n and creates such a matrix, in the same language as a cop post, and with a code that matches the cop's regex. The output format of your code must match the output format of the cop's code.

Please leave a comment under the Cop's post to indicate that you have cracked it.

Winning criterion:

The winner will be the user that has cracked the most submissions. In case of a tie, then there will be multiple winners.
Jelly, 9 bytes, cracks @Dennis' answer

²sµUFḤ$¦G


Try it online!

Should be correct now; I had to rather rethink what I was doing.

Explanation

The hardest part of this problem is getting a list of the even indices inside the ¦ (which applies an operation at specific indices). Unlike most operations, which use the input to the whole program as a default for the second operand, ¦ uses the most recently seen value as a default (because it conceptually has two left operands, rather than a left and a right operand like most things that take in two values).

However, we can observe that we have a list of numbers, including all integers from 1 to half the input, already in the current value at the time. As such, flattening and doubling it gives us a list of even numbers, including all the even indices (also some other even numbers but we don't care about those). It's even possible to spend one µ solely to avoid a parsing ambiguity and still come in within 9 characters.

²sµUFḤ$¦G
 s         Split
²          {the list of numbers from 1 to} the square of {the input}
  µ        into a number of pieces equal to {the input};
   U       then reverse
       ¦   the elements at indexes
    F      obtained by flattening the split list
      $    and
     Ḥ     doubling each element in the flattened list;
        G  finally, format it into a grid.