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.
Java Regex 2 - Duplicate Words
Java Regex 2 - Duplicate Words
Sort by
recency
|
398 Discussions
|
Please Login in order to post a comment
Test case 0
Test case 1
Test case 2
Test case 3
Test case 4
Test case 5
Test case 6 Compiler Message Wrong Answer Input (stdin) 5 Goodbye bye bye world world world Sam went went to to to his business Reya is is the the best player in eye eye game in inthe Hello hello Ab aB Expected Output Goodbye bye world Sam went to his business Reya is the best player in eye game how to so
import java.util.Scanner; import java.util.regex.Matcher; import java.util.regex.Pattern;
Has anyone faced the problem that code does not print to stdout even though it does in local machine? here is my code
The instruction are incomprehensible. I cannot even get the custom checker to run my code.
String regex = "(?iu)\b(\w+)\b(?:\s+\1\b)+"; Pattern p = Pattern.compile(regex);