update regexp so that any dots inside the given path cannot match here