I know that this may be an amateur question but for some reason I can’t remember how to do this.
I have 2 strings.
String s ="[";
String q ="]";
if my text contains any of these i want to replace it with w which is:
String w = "";
I have tried the following:
output=String.valueOf(profile.get("text")).replace(s&&q, w);
from what i understand if of S([) and any of Q(]) are in text they will be replaced with w.
my problem is getting the 2. if i only try and replace one then it will work. otherwise it wont.
any help would be appreciated
You can nest them up too: