Historically, I've avoided Regular Expressions as I've found them cryptic and very difficult to work with. Over the past few years I've had more need for them and have been using them often enough that I'm getting used to the idea of using them.
Lots of power, but still just as cryptic as ever. This page will list various tips/tricks/recipes that I've found useful.
I've listed these for my use with Notepad++, but some may work well for other purposes also.
|Regular Expression||Purpose||Useful for|
||Match on C++ (or C99+) comments and all text after||Selecting comments for removal|
||Match the first word character||Notepad++ Search box|
|\1||Append a "pipe" in front of the first match found in an earlier search||Notepad++ Replace box|
||Match lines that start with whitespace and end with whitespace||Notepad++ Search box; search & replace for code cleanup.|
||Match trailing whitespace||Notepad++ Search box; search & replace for code cleanup.|
||Match leading whitespace||Notepad++ Search box; forced text alignment|