This seems wrong; you're saying it's a match if it reaches the beginning of either input, which would mean that the number "1" matches all phone numbers ending in "1".