Creating Search Engine Friendly URL based on Post Title
Let's say you were developing a news posting script (or blog, whatever) and for each entry you have a Title and Article field. Now let's say that you want to have search engine friendly links on your site for all your news stories. You want to generate the search engine friendly URL based on the Title of the news posting. So for example you post a news story with a title of "The New Sitepoint Book is About XHTML." Your link to the article would be something like:
How would you develop a function that would take the Title of a news posting and strip out all garbage out of it and return a search engine friendly URL? What kinds of characters or words would you strip out of the Title (like 'a' 'or' 'and' etc...)? How would you format a regular expression to strip out all non alphanumeric characters? What's the best method for doing something like this?