title: the difference between `\\s|*` and `\\s|[*]` in regular expression in r?
body: <p>What is the difference between <code>\\s|*</code> and <code>\\s|[*]</code> in regular expression in r?  </p>
  
  <pre><code>&gt; gsub('\\s|*','','Aug 2013*')
  [1] "Aug2013*"
  &gt; gsub('\\s|[*]','','Aug 2013*')
  [1] "Aug2013"
  </code></pre>
  
  <p>What is the function of <code>[  ]</code> here?</p>