I tried to replace "-" character in a Java String but is doesn't work :

```
str.replace("\u2014", "");

```

Could you help me ?
['https://Stackoverflow.com/questions/17761717', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1076026/']
this simply works.. 

```
    String str = "String-with-dash-";
    str=str.replace("-", "");
    System.out.println(str);

```

output - Stringwithdash
It's quite easy. You can use an Apache library, that will be useful while you develop an application. This is apache-commons-lang. You can do the following: 

```
public class Main {

    public static void main(String[] args) {

        String test = "Dash - string";
        String withoutDash = StringUtils.replace(test, "-", "");
        System.out.println(withoutDash);
    }

}

```