title: Keep all alpha and numeric characters and turn white space into -
body: <p>What im trying to do is:
  Take a string</p>
  
  <ol>
  <li>remove anything that is not alpha and numeric characters.</li>
  <li>Im also trying to turn any white space into a -, (multiple white space will become a single -) </li>
  <li>covert all into lower case</li>
  </ol>
  
  <p>The reason for this is to generate a friendly URL from a user input </p>
  
  <p>This is all i have so far </p>
  
  <pre><code>var str = "This is    a really bad Url _, *7% !";
  result1 = str.replace(/\s+/g, '-').toLowerCase();
  alert(result1); 
  </code></pre>