title: String Split using a regular expression in Java?
body: <p>I am trying split a string based on regular expression which contains "[.,?!]+'"  all these characters including a single space but splitting is not happening?</p>
  
  <p>Here's my class:</p>
  
  <pre><code>public class splitStr {
  public static void main(String[] args)  {
  
          String S="He is a very very good boy, isn't he?";
          S.trim();
          if(1&lt;=S.length() &amp;&amp; S.length()&lt;=400000){
          String delim ="[ .,?!]+'";
              String []s=S.split(delim);
  
          System.out.println(s.length);
  for(String d:s)
  {
      System.out.println(d);
  }
          }
      }
  }
  </code></pre>