title: subtract part of text
body: <p>I have this code</p>
  
  <pre><code>public void descargarURL() {
      try{
          URL url = new URL("https://www.amazon.es/MSI-Titan-GT73EVR-7RD-1027XES-Ordenador/dp/B078ZYX4R5/ref=sr_1_1?ie=UTF8&amp;qid=1524239679&amp;sr=8-1");
          BufferedReader lectura = new BufferedReader(new InputStreamReader(url.openStream()));
          File archivo = new File("descarga2.txt");
          BufferedWriter escritura = new BufferedWriter(new FileWriter(archivo));
          BufferedWriter ficheroNuevo = new BufferedWriter(new FileWriter("nuevoFichero.txt"));
          String texto;
  
          while ((texto = lectura.readLine()) != null) {
              escritura.write(texto);
  
              }
          lectura.close();
          escritura.close();
          ficheroNuevo.close();
          System.out.println("Archivo creado!");
          //}
  
      }
      catch(Exception ex) {
          ex.printStackTrace();
      }
  }
  public static void main(String[] args) throws FileNotFoundException, IOException {
      Paginaweb2 pg = new Paginaweb2();
      pg.descargarURL();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>And I want to remove from the URL the part of the reference that is <strong>B078ZYX4R5</strong>, and this entity /</p>
  
  <p>After the html that is saved in the text file there is a part of the code that has <code>*"&lt;div id =" cerberus-data-metrics "style =" display: none; "data-asin =" B078ZYX4R5 "data-as-price = "1479.00" data-asin-shipping = "0" data-asin-currency-code = "EUR" data-substitute-count = "0" data-device-type = "WEB" data-display-code = "Asin is not eligible because it has a retail offer "&gt; &lt;/ div&gt;"*</code>, and I want to only get the price from there that is <strong>1479.00</strong>, it is included among the tags <strong>"data-as-price = "</strong></p>
  
  <p>I dont want to use external libraries, I know that it can be done with split, index of, and substring</p>
  
  <p>Thanks!!!! </p>