used like this: thrownError.message.matches(regex)