If I understand it correctly, * can mean "any string" or mean "remove the previous element", as seen in the isMatch("aab","cab)" case.
If that is correct, abac*a can do the following:
- b* means removal of b, abaca becomes aac*a
- c* means removal of c, aaca becomes aaa
so why does "aaba" not match "aaa"?
A * means a string consisting of zero or more instances of the previous character, nothing else. It cannot insert new characters that did not exist in the string already.
Look at the two strings again. The first, which must be matched, has 2 a's before the first b. The pattern only has one a before the b, and there are no other places the b could come from. Therefore, no strings with more than one a before the b can match that pattern.