Only create the regular expression for content/sender matches once.

Fixes #1227.
Merge pull request #54 from Bombe/issue-1227

Only create the regular expression for content/sender matches once.