fork download
  1. import java.io.*;
  2. import java.util.regex.*;
  3. import java.util.Arrays;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. String source = "stack overflow is awesome 200.00 ";
  11. String[] parts = source.split("\\s{2,}");
  12. System.out.println(Arrays.toString(parts));
  13. }
  14. }
Success #stdin #stdout 0.06s 4386816KB
stdin
Standard input is empty
stdout
[stack overflow is awesome, 200.00]