replace grep with regexp