Detect partial matches.
Use inclusive end index for symmetry.