DOC: Add example to extract docstring, and explain change to match more clearly
Merge pull request #5826 from danielballan/extract-docstring

DOC: Add example to extract docstring, and re-explain change to match.