Matching Anything But a Newline

  • + 0 comments

    I noticed a big flaw in the test case.

    right now the pattern ^(.{3}\.?){4}$ passes all the test case, but this violates the problem statement that the pattern needs to strictly follow a period after the first three charcters. for example "abcdefghijkl" passes the test, when it shouldn't.

    short solution not violating this constraint can be something like ^...(\....){3}$ which enforces the \.