fork(4) 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 text = "The urn was then carried for several rounds around the cremation site, for the last leg of the procession.";
  10. String[] results = text.split("\\W+");
  11. System.out.println(Arrays.toString(results));
  12. }
  13. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
[The, urn, was, then, carried, for, several, rounds, around, the, cremation, site, for, the, last, leg, of, the, procession]