(#1107) - corrected regex in publish

I corrected regex in publish.sh. Is that all? Should I add a test (how)?