import placeholder.http.HttpRequest;
public class Test {
public static void main(String[] args) throws MalformedURLException {
HttpRequest request = new HttpRequest("http://wainox.de");
request.send();
String illegalChars = "[^\\\u0000-\\\u002C\\\u002E\\\u002F\\\u003A-\\\u0040\\\u005B-\\\u0060\\\u007B-\\\u007F]+";
String urlPattern = "(" +
"(?:" + // hostname
"https?://" + illegalChars + "(?:\\." + illegalChars + ")*" +
"|" +
"www\\.(?:" + illegalChars + "\\.)+" +
"(?:[a-z]{2,4}(?=\\b))" +
")" +
"(?::\\d+)?" + // port
")";
Pattern pattern = Pattern.compile(urlPattern, Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(request.getResponseBody() + "s hTtp://wwainox.de/name.gif");
while (matcher.find()) {
System.out.println(matcher.group());
}
}