title: How can i split a string by dot, comma and newline with removing whitespaces by using regex in javascript?
body: <p>I have string like this:</p>
  
  <pre><code>what, be inclined to, hi . hello 
  where
  </code></pre>
  
  <p>I want to split it like this:</p>
  
  <pre><code>["what","be inclined to","hi","hello","where"]
  </code></pre>
  
  <p>Currently I'm using this regex but It doesn't work like I want:</p>
  
  <pre><code>input_words.val().replace(/^\s*|\s*$/g, '').split(/\n|\s*,|\./);
  </code></pre>