fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.util.regex.*;
  5. import java.lang.*;
  6. import java.io.*;
  7. import java.util.Scanner;
  8.  
  9. /* Name of the class has to be "Main" only if the class is public. */
  10. class Ideone
  11. {
  12. public static void main (String[] args) throws java.lang.Exception
  13. {
  14. String s = "Some text. More, more text. /* \n|| This is a comments section in pl/sql code...||\n|| Which i don't want to store.. ||\n*/ SOME HERE";
  15. Scanner in1 = new Scanner(s);
  16. ArrayList<String> Code1 = new ArrayList<String>();
  17. in1.useDelimiter("/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/|[\\p{javaWhitespace}.,]+");
  18. while (in1.hasNext()) {
  19. System.out.println(in1.next().toLowerCase());
  20. }
  21. }
  22. }
Success #stdin #stdout 0.14s 321280KB
stdin
Standard input is empty
stdout
some
text
more
more
text


some
here