@@ -0,0 +1,1128 @@
+package strings.tagextractor;%0A%0Aimport java.util.Scanner;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * Created by jsong on 15/03/2017.%0A * %3Cp%3E%0A * hackerrank%09: https://www.hackerrank.com/jsong00505%0A * github%09%09: https://github.com/jsong00505%0A * linkedin%09%09: https://www.linkedin.com/in/junesongskorea/%0A * email%09%09: jsong00505@gmail.com%0A * %3Cp%3E%0A * challenge%09: Tag Content Extractor%0A */%0Apublic class Solution %7B%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Scanner in = new Scanner(System.in);%0A%09%09int testCases = Integer.parseInt(in.nextLine());%0A%0A%09%09// constraints%0A%09%09assert(testCases %3C 1 %7C%7C testCases %3E 100);%0A%0A%09%09while(testCases %3E 0)%7B%0A%09%09%09String line = in.nextLine();%0A%0A%09%09%09// regex%0A%09%09%09/*%0A4%0A%3Ch1%3ENayeem loves counseling%3C/h1%3E%0A%3Ch1%3E%3Ch1%3ESanjay has no watch%3C/h1%3E%3C/h1%3E%3Cpar%3ESo wait for a while%3C/par%3E%0A%3CAmee%3Esafat codes like a ninja%3C/amee%3E%0A%3CSA premium%3EImtiaz has a secret crush%3C/SA premium%3E%0A%09%09%09*/%0A%0A%09%09%09String regEx = %22(%3C%5C%5Cb.+%5C%5Cb%3E)%5C%5C1%22;%0A%09%09%09Pattern p = Pattern.compile(regEx);%0A%09%09%09Matcher m = p.matcher(line);%0A%0A%09%09%09while(m.find()) %7B%0A%09%09%09%09System.out.println(m.group());%0A%09%09%09%7D%0A%0A%09%09%09testCases--;%0A%09%09%7D%0A%0A%09%09// close Scanner%0A%09%09in.close();%0A%09%7D%0A%7D%0A

Tag Content Extractor(not completed)