Updated python_docs regex pattern and added more unittests

Removed the need for rstripping full stops from the regex matches.

Added some more complicated unittests.

Thanks Jerry and Robert :3