title: Apostrophe as part of a word with regexp in MATLAB
body: <p>I am working on something in MATLAB that processes text. For this I need my regular expression to work properly.</p>
  
  <p>So far I have this regexp below, which works for almost everything, but I would like to add something to it so that it reads an apostrophe as a part of a word.</p>
  
  <pre><code>V1 = regexp(inpstr,'\w*[^a-zA-Z0-9\ _\ -\ "\ *\f\n\r\t\v\x20]?','match');
  </code></pre>
  
  <p>So, my an examplary question is: If I have a string:</p>
  
  <p><code>'Hi, let's play some ball.'</code></p>
  
  <p>I would like the regexp to give me <code>'Hi,' - 'let's' - 'play' - 'some' - 'ball.'</code></p>
  
  <p>and currently it gives me <code>'Hi,' - 'let' - 's' - 'play' - 'some' - 'ball.'</code></p>
  
  <p>I guess the problem is I can't just add \ ' to the regexp because of MATLABs use of '.
  I tried just adding it and this happened: <code>??? Error: File: TestScript.m Line: 13 Column: 38
  The input character is not valid in MATLAB statements or expressions.</code></p>
  
  <p>Any help would be greatly appreciated =)</p>