@@ -0,0 +1,1065 @@
+import java.util.*;%0Aimport java.util.regex.*;%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) %7B%0A        Scanner in = new Scanner(System.in);%0A        Matcher matcher = Pattern.compile(%0A                                          %22%3C%5C%5Cs*a%5C%5Cs+href%5C%5Cs*=%5C%5Cs*%5C%5C%5C%22%22%0A                                          + %22(?%3Clink%3E%5B%5E%5C%5C%5C%5C%5C%22%5D*)%22%0A                                          + %22%5C%5C%5C%22%5B%5E%3E%5D*%3E(?:%3C%5B%5E%3E%5D*%3E)*%22%0A                                          + %22(?%3Cname%3E.*?)%22%0A                                          + %22(?:%3C%5C%5Cs*/%5B%5E%3E%5D*%3E)*%3C%5C%5Cs*/%5C%5Cs*a%5C%5Cs*%3E%22,%0A                                          Pattern.CASE_INSENSITIVE%0A                                          ).matcher(%22%22);%0A        %0A        for (int N = Integer.parseInt(in.nextLine()); N %3E 0; N--) %7B%0A            String html = in.nextLine();%0A            matcher.reset(html);%0A            while (matcher.find()) %7B%0A                String link = matcher.group(%22link%22).trim();%0A                String name = matcher.group(%22name%22).trim();%0A                System.out.println(link+%22,%22+name);%0A            %7D%0A        %7D%0A    %7D%0A%7D

add detect-html-links