Hi there I am trying to remove two or more words in a String with the replaceAll method in Java but I am not good in regex at all and I have not been able to do it. So, here is the code:
public static void main(String[] args) {
String s= "@class::menu-select @id::calibration-content";
System.out.println(s.replaceAll("[(@class::)(@id::)]",""));
}
But when I run this what I get is the following text menu-eet brton-ontent By the way the words I am trying to remove are @class:: and @id:: Does anyone know how to do this? Thanks in advance!