Documented regexes

This about the best explanation on a regex I’ve ever seen. It shows just how complicated they can be but also how you can break them up into manageable parts.

http://core.trac.wordpress.org/browser/trunk/wp-includes/shortcodes.php#L174