I have a string and I need to replace || '-' ||
with ,
using regex.
Please find the code below:
String str= "str1 || '-' || str2";
str.replaceAll("|| '-' || ", ",");
This replaceAll method is not working. Can anyone please suggest the correct way.
Output should be: str1,str2