The exceptions for control flow here are a little weird. You `raise` if something matches, then catch and return True if it does. Could this be restructured to not require exceptions for control flow?