Case insensitive and pattern matching

This replaces pull request #1751. This is for issue #1724.
Same comments to this doc as to `should_contain_match`. Could also simply refer to those docs instead of repeating everything.