Update regex matching to work following commas

Fixes #23.