If no match is found, the function returns (None, 0, and 0).