title: Replace space in a String with replaceAll not working in JAVA
body: <p>I try to remove a space into a string which contains a int type value.</p>
  
  <ul>
  <li>I read a .csv file with the scanner methode.</li>
  <li>I use a Class to set/get the data.</li>
  <li>I format data into the setter of the class.</li>
  </ul>
  
  <p>Input data example:</p>
  
  <pre><code>String Pu_ht = "1 635,90";
  </code></pre>
  
  <p>Basic Example:</p>
  
  <pre><code>/**
   * @param Pu_ht the Pu_ht to set
   */
  public void setPu_ht(String Pu_ht) {
      this.Pu_ht = Pu_ht.replace(",", ".").replace(".00", "");
  }
  </code></pre>
  
  <p>Tried example:</p>
  
  <pre><code>  /**
   * @param Pu_ht the Pu_ht to set
   */
  public void setPu_ht(String Pu_ht) {
      this.Pu_ht = Pu_ht.replace(",", ".").replace(".00", "").replaceAll("\\s+", "");
  }
  </code></pre>
  
  <p>Other example:</p>
  
  <pre><code> /**
   * @param Pu_ht the Pu_ht to set
   */
  public void setPu_ht(String Pu_ht) {
      this.Pu_ht = Pu_ht.replace(",", ".").replace(".00", "").replaceAll(" ", "");
  }
  </code></pre>
  
  <p>Output data example: 1 635.90</p>
  
  <p>I tried a lots of things but nothing work for my case.</p>
  
  <p>Best regards</p>
  
  <p>EDIT: </p>
  
  <p>My code: </p>
  
  <pre><code> public void requete_pommes() throws IOException, ClassNotFoundException, SQLException {
      // open file input stream
      BufferedReader reader = new BufferedReader(new FileReader(filename));
  
      // read file line by line
      String line = null;
      Scanner scanner = null;
      int index = 0;
      List&lt;Pommes&gt; pomList = new ArrayList&lt;&gt;();
      boolean firstLine = false;
  
      while ((line = reader.readLine()) != null) {
          if (!(line.equals(";;;;TOTAL HT"))) {
  
              if (!(line.equals(";;;;"))) {
  
                  Pommes pom = new Pommes();
                  scanner = new Scanner(line);
                  scanner.useDelimiter(";");
                  while (scanner.hasNext()) {
                      String data = scanner.next();
  
  
                      pom.setNumero_compte("21826");
                      if ((index == 0)) {
                          pom.setReference(data);
                      } else if ((index == 1)) {
                          pom.setDesignation(data);
                      } else if ((index == 2)) {
                          pom.setQte(data);
                      } else if ((index == 3)) {
                           if(data.equals("1 635,90")){
                                data = data.replaceAll("\\s","");
                                System.err.println("data: " + data);
                           }
                          pom.setPu_ht(data);
                      } else if ((index == 4)) {
                          pom.setMontant_HT(data);
                      } else {
                          System.out.println("invalid data::" + data);
                      }
                      pom.setNumero_commande("1554");
  
                      index++;
                  }
                  index = 0;
                  pomList.add(pom);
  
                  requeteCorps = "(( SELECT codea FROM article WHERE tarif7 != 'O' AND tarif8 = 'O' AND pvente &gt; 0 AND  COALESCE(trim( reffou), '') != '' AND reffou = '" + pom.getReference() + "' ), " + pom.getQte() + " , " + pom.getPu_ht() + ", '" + kapiece + "', 'stomag','vendu', getnum('LCK')),";
  
                  ar.add(requeteCorps);
              }
  
          }
  
      }
  </code></pre>