title: How to capitalise the first letter of every word in a string
body: <p>I am using the Flex SDK and able to capitalise the first letter of every word as follows:</p>
  
  <pre><code>textInput.text.toLowerCase().replace(/\b./g,function(...m):String{return m[0].toUpperCase()})
  </code></pre>
  
  <p>This works fine, however letters after punctuation are also being capitalised, which works in some cases (e.g. O'Neil) but not others (e.g. Connah'S Quay).</p>
  
  <p>I want to have the code only look at letters at the start of a string and letters after a space. Can anyone provide the correct code to use in this instance please?</p>