fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main(String[] args) {
  11. final String REG_EXPR = "[!\"#$%&'()*+-./:;<=>?@\\^_{|}~`,.\\[\\]–]";
  12. String description="திகழ்கிறது.@;@;@;@;ஆனால் ஆனால் ";
  13. String s1 = description.replaceAll(REG_EXPR," ");
  14. Scanner scanner = new Scanner(s1);
  15. while (scanner.hasNext()){
  16. System.out.println("s1 value " + scanner.next());
  17. }
  18. }
  19.  
  20. }
Success #stdin #stdout 0.1s 380864KB
stdin
Standard input is empty
stdout
s1 value திகழ்கிறது
s1 value ஆனால்
s1 value ஆனால்