fix regular expessions (ported from bnc #743805)