[1.7.x] Fixed #23277 -- Backport patterns() documentation changes.

Refs #22218