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/']
String is Immutable in Java. You have to reassign it to get the result back:

```
String str ="your string with dashesh";
str= str.replace("\u2014", "");

```

See the [API](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replace%28java.lang.CharSequence,%20java.lang.CharSequence%29) for details.
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);
    }

}

```