We want to make this open-source project available for people all around the world.

Help to translate the content of this tutorial to your language!

back to the lesson

Regexp ^$

Which string matches the pattern ^$?

An 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 ^ (input start), yes it’s there, and then immediately the end $, it’s here too. So there’s a match.