Nettuts+ has a good article on 8 regular expressions you should know, useful for every Web developer. The article covers four of the most common matches needed—usernames, passwords, email addresses, and URLs, plus four others. For each, the pattern is presented and described, and examples of what will and won’t match each pattern are included. A quick and worthwhile read!
Archives For regex