a*match with the
ain the string?
a can match zero or more times, so the
'' empty string also matches that expression. That leaves
'ad' after the initial empty string to match for the remainder of the expression.
A regex will consider both options here (both
'', the empty string, and
'a' satisfy the
a+ if you wanted the pattern to match at least once.
solved Why does a*ad$ match the string “ad”? [duplicate]