fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. String s = "hey.. hello split !!! example me.";
  13. String[] split = s.split("(?<=([?!.])\\1{1,99})");
  14. System.out.println(Arrays.toString(split));
  15.  
  16. }
  17. }
Runtime error #stdin #stdout #stderr 0.1s 320512KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Exception in thread "main" java.util.regex.PatternSyntaxException: Look-behind group does not have an obvious maximum length near index 18
(?<=([?!.])\1{1,99})
                  ^
	at java.util.regex.Pattern.error(Pattern.java:1955)
	at java.util.regex.Pattern.group0(Pattern.java:2863)
	at java.util.regex.Pattern.sequence(Pattern.java:2051)
	at java.util.regex.Pattern.expr(Pattern.java:1996)
	at java.util.regex.Pattern.compile(Pattern.java:1696)
	at java.util.regex.Pattern.<init>(Pattern.java:1351)
	at java.util.regex.Pattern.compile(Pattern.java:1028)
	at java.lang.String.split(String.java:2368)
	at java.lang.String.split(String.java:2410)
	at Ideone.main(Main.java:13)