adjusted regex groups live with python3, fixes #786
Merge pull request #797 from scopatz/py3fix

adjusted regex groups to live with python3, fixes #786