There is piece of code that replaces the C/o,d/o,s/o or w/o as below :
if (temp.contains(",,"))
{
temp=temp.replace ("C/O,,","");
temp=temp.replace ("S/O,,","");
temp=temp.replace ("D/O,,","");
temp=temp.replace ("W/O,,","");
}
But i want to replace above by regex so that it automatically removes C or S or D or W if there is a char sequence ",," I am not able to get what regex can be used . Please help.