I wonder if it is possible to replace specific string with another string plus position without using PL/SQL block (loops, user defined function/stored procedures, with function construct ...).
Here: st -> pos_num
Input:
"aa bbb st cccc dddd st eeeeeeeeeee ffff g st g h i st j k l m st"
Output:
"aa bbb pos_1 cccc dddd pos_2 eeeeeeeeeee ffff g pos_3 g h i pos_4 j k l m pos_5"
I feel that it is possible to achieve it with one line operation(maybe regex).
REGEXP_INSTR,REGEXP_REPLACEandLEVELcombination.?'post'with'popos_1'? If not - if 'st' is only replaced if it is a "stand-alone word", what are the rules? (For example: what if it's part of a compound word, like'st-jack'?)st-jackshould not be affected.<space>st<space>should be replaced.