I struggle to remember how to put together a pattern search with regular expressions, so I was excited to discover Lea Verou‘s talk from May 2012, which breaks down how to construct them for JavaScript. (What she teaches can be applied to other languages as well.)
Lea is a front-end engineer who works for the World Wide Web Consortium (W3C). She created RegExp Playground so you can experiment with your own regex patterns. She uses it in her talk below.