Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/12/2011, 15:25
marcofbb
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Problema en Expresion Regular

Ya lo pude resolver gracias a SERBice

Código Javascript:
Ver original
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package javaapplication1;
  6. import java.io.BufferedReader;
  7. import java.io.IOException;
  8. import java.io.InputStreamReader;
  9. import java.net.MalformedURLException;
  10. import java.net.URL;
  11. import java.net.URLConnection;
  12.  
  13. /**
  14.  *
  15.  * @author Administrador
  16.  */
  17. public class JavaApplication1 {
  18.  
  19.     /**
  20.      * @param args the command line arguments
  21.      */
  22.     public static void main(String[] args)
  23.       throws MalformedURLException, IOException {
  24.         URL url = new URL("http://www.megaupload.com/?d=44DIF7IK");
  25.         URLConnection con = url.openConnection();
  26.         BufferedReader in = new BufferedReader(
  27.                 new InputStreamReader(con.getInputStream()));
  28.         String linea;
  29.         int i=1;
  30.         linea = in.readLine();
  31.         while ((linea = in.readLine()) != null && i < 174) {
  32.               i++;
  33.         }
  34.         int j = 0;
  35.         String [] campos = linea.split("\"");  
  36.         System.out.println(campos[1]);  
  37.     }
  38. }