Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Split String regex java

String[] array=s.split("[!,?._'@s]+");
//new approach
  s=s.trim();
        if(s.length()==0)
        {
            System.out.println(0);
            return;
        }
        
        String[] array=s.split("[^a-zA-Z]+");
        System.out.println(array.length);
       for(int i=0;i<array.length;i++)
 
PREVIOUS NEXT
Tagged: #Split #String #regex #java
ADD COMMENT
Topic
Name
3+1 =