I did get it to work after commenting out everything else and then un-commenting it, so I have no idea what was going on.
I'm just kind of fumbling around with the regexps too. Reminds me a bit of the quote about having one problem, using regex to solve it, and then having two problems.
Or this xkcd comic.