Improved support for dynamic repositories

New PR for #245 which was buggy
For the MergeMessageRegexPattern you should be able to use something like [this](http://regexr.com/39kge)