Some regex APIs make the distinction between matching and searching. Matching means "is the entire input string accepted by this regular expression", and in this sense the only input that matches the empty regex is the empty string. Searching, on the other hand, means "does the input string contain at least one substring accepted by this regular expression", and the empty string is the substring of every string. One can think of matching as searching with implicit ^ and $ anchors affixed to the regex.