Learn Regex The Hard Way
The code and explanation goes here.
What it looks like to run it is here.
Extra things you should do on your own to learn more.
Potential portability problems with this concept in other regex.
Copyright (C) 2010 Zed. A. Shaw