en.javascript.info/9-regular-expressions/12-regexp-anchors/1-start-end/solution.md
2019-04-02 14:01:44 +03:00

327 B

The empty string is the only match: it starts and immediately finishes.

The task once again demonstrates that anchors are not characters, but tests.

The string is empty "". The engine first matches the pattern:^ (input start), yes it's there, and then immediately the end pattern:$, it's here too. So there's a match.