fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. String s = " here is a $$ cell here another cells I dont care about.........";
  10. String[] res = s.trim().split("\\s{3,}");
  11. if (res.length > 1) {
  12. System.out.println(res[0]); // Item 1
  13. System.out.println(res[1]); // Item 2, the rest is unimportant
  14. }
  15. }
  16. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
here is a $$ cell
here  another