replace before filter with regexp