Switch to matchFirst/matchAll for examples
Use documented unittest rather than code dup