replace last occurrence FIXED by nn

c=&c+1;main(p,a,b){for(;~scanf("%s%s%s",a,b,p=c);printf(p-c?"%.*s%s%s":c,p-c,c,b,--p+strlen(a)),puts(""))for(;strstr(++p,a););}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page