fix regular expessions (ported from bnc #743805)

This is a request collecting remaining issues from bnc #831826.