Support for pattern-replace in public.