title: Regular expression - any text to URL friendly one
body: <p>PHP regular expression script to remove anything that is not a alphabetical letter or number 0 to 9 and replace space to a hyphen - change to lowercase make sure there is only one hyphen - between words no -- or --- etc.</p>
  
  <p>For example:</p>
  
  <p>Example: The quick brown fox jumped
  Result: the-quick-brown-fox-jumped</p>
  
  <p>Example: The quick brown fox jumped!
  Result: the-quick-brown-fox-jumped</p>
  
  <p>Example: The quick brown fox - jumped!
  Result: the-quick-brown-fox-jumped</p>
  
  <p>Example: The quick ~`!@#$%^ &amp;*()_+= ------- brown {}|][ :"'; &lt;>?.,/ fox - jumped!
  Result: the-quick-brown-fox-jumped</p>
  
  <p>Example: The quick 1234567890 ~`!@#$%^ &amp;*()_+= ------- brown {}|][ :"'; &lt;>?.,/ fox - jumped!
  Result: the-quick-1234567890-brown-fox-jumped</p>
  
  <hr>
  
  <p>Anybody have idea for the regular expression?</p>
  
  <p>Thanks!</p>