We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Java
- Strings
- Tag Content Extractor
- Discussions
Tag Content Extractor
Tag Content Extractor
Sort by
recency
|
218 Discussions
|
Please Login in order to post a comment
This code run for intelliJ IDEA and output will be run successfully. But not for HackerRank Solution. output is generate None.
public static void main(String[] args) { // Input: Number of lines followed by the lines of text Scanner scanner = new Scanner(System.in); int n;
// String regex = "<([a-zA-Z0-9\s]+)>(.*?)"; String regex = "<(.+)>([^<]+)"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(line); boolean found = false;
}
For any reason the algorithm can't match this line
start tag --> bbgnEsMIM%9L=E v)f6GjSkSK6W5HWdel)VbBvZRG)#&b=+6k(O9=&C
value --> rulVew89#uyWF}4`T"xULOZ%1"5Cu)&x7qD0
end tag --> /bbgnEsMIM%9L=E v)f6GjSkSK6W5HWdel)VbBvZRG)#&b=+6k(O9=&C
I put it in Intellij and it works well but in Hackerrank page doesn't work, I found out this one in the sample test 3
For some reason I got errors.
import java.util.; import java.util.regex.;
public class Solution {
}