Guide: patterns.

Fixes #4417.
Added examples of most of these.