fork download
  1. class RemoveResolved {
  2. public static void main(String[] args) {
  3.  
  4. String reason1 = "(Resolved)";
  5. String reason2 = "Issue fixed (Resolved)";
  6. String reason3 = "(Resolved) Monitor down";
  7. String reason4 = "Monitor down (Resolved) Now working";
  8.  
  9. // Replace (Resolved) including parentheses
  10. String regex = "\\(Resolved\\)";
  11.  
  12. System.out.println(reason1.replaceAll(regex, ""));
  13. System.out.println(reason2.replaceAll(regex, ""));
  14. System.out.println(reason3.replaceAll(regex, ""));
  15. System.out.println(reason4.replaceAll(regex, ""));
  16.  
  17. }
  18. }
  19.  
Success #stdin #stdout 0.09s 54820KB
stdin
 
stdout
Issue fixed 
 Monitor down
Monitor down  Now working