The C++ Boost library (available here) is one of the most useful tools for any C++ programmer. I recently began using the boost regex package and have found it to be totally awesome.

At one point I found myself wanting to use regular expressions that matched multiple lines and found that I didn't know much about the special matching characteristics to deal with regex's operating over multiple lines. I learned and thought I'd relate what I found out, along with some sample code, here.