find and replace rule, basic rule factory, apis for type Record