I am unable to replace part of the substring in my code ? I want to get rid of the unwanted characters but i still get the same output ?
String BusDetails = "ROUTE 3 — CLEARBROOK-UFV GOLINE TO UFV" ;
System.out.println("BusDetails before"+BusDetails);
BusDetails.replaceAll("—", "");
System.out.println("BusDetails After"+BusDetails);
// Output
BusDetails before ROUTE 3 — CLEARBROOK-UFV GOLINE TO UFV
BusDetails After ROUTE 3 — CLEARBROOK-UFV GOLINE TO UFV