try to fix regex problem for ubuntu and OSX