import java.net.*; import java.io.*; import java.util.regex.*; public class Veebilugeja2{ public static void uuriRida(String rida){ Pattern muster=Pattern.compile("(http://[^\\\"]+)"); Matcher m=muster.matcher(rida); while(m.find()){ System.out.println(m.group()); } } public static void main(String argumendid[]) throws IOException{ String aadress="http://lin2.tlu.ee/~jaagup"; BufferedReader sisse=new BufferedReader( new InputStreamReader(new URL(aadress).openStream()) ); String rida=sisse.readLine(); while(rida!=null){ uuriRida(rida); //System.out.println(rida); rida=sisse.readLine(); } } }