I have a big string which has many url strings, I want to replace context of all urls. for example
https://host:port/sometext/abc
i want to replace /sometext/
with /newtext/
like this
mystring.replaceAll("/sometext/", "/newtext/");
I cant just search sometext
and replace because sometext
might have been used at many places.
But its not working even I tried replace method also but its also not working. Am I doing anything wrong?
Thanks in advance