By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
REGEXP_REPLACE(REGEXP_REPLACE(STR,'AP','WP',1,REGEXP_COUNT(STR,'AP')-1),'AP','WP',1,1) |
---|
Row first WP form here AR form to all WP was |
Row second WP form there AR form to all WP was |