fork 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 SPECIAL_CHARACTERS_REGEX = "[ ?:;'=\\()!\\[\\]-]+|(?<=\\d)(?=\\D)";
  9. String rawMessage ="let's meet tomorrow at 9:30p? 7-8pm? i=you go (no Go!) [to do !]";
  10. String[] tokens = rawMessage.split(SPECIAL_CHARACTERS_REGEX);
  11. System.out.println(Arrays.toString(tokens));
  12. }
  13. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
[let, s, meet, tomorrow, at, 9, 30, p, 7, 8, pm, i, you, go, no, Go, to, do]