fork(5) download
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. String s = "this ; \"but \\\" not ; this\"";
  9. System.out.println(Arrays.toString(s.split(";(?=(?:(?:.*?(?<!\\\\)\"){2})*[^\"]*$)")));
  10. }
  11. }
Success #stdin #stdout 0.08s 380160KB
stdin
Standard input is empty
stdout
[this ,  "but \" not ; this"]