bs_publish: fix regex support in publishedhooks

Fixed support for regular expressions in publishedhooks.