My timing's impeccable: a couple of months after I did my last trawl for free Windows text editors that have multi-line regular expression functionality, Notepad++ got it, about a year ago.
Whilst there are ways to work around search-and-replace that can't handle line ending characters, they're always a kludge, so this is very welcome. And it's Perl compatible syntax, which is widely implemented and familiar. A pretty exhaustive breakdown of the differences between major variants compiled by the author of EditPad can be found at: http://www.regular-expressions.info/refflavors.html
Although I found Programmer's Notepad back then, most code I've needed to work with recently has been SQL, vbscript or batch files, so the concept of getting to know it with HTML/PHP/CSS/JS didn't get far. Not that PN2 would be in any way a bad choice for any of those uses from what I've seen, but I was going to set it aside for the web stuff and use it concurrently with NoteTab for comparison purposes. Then things got busier, and NoteTab's been a habit for well over ten years by this point. It hasn't changed much in all that time, but I know it like few other applications. Another consideration, I suppose, is that PN2 is maintained as a hobby project by a guy who's quite reasonably got other life priorities right now, and there's value to standardising on software with a big community of users that you can point anyone towards — Notepad++ is extremely popular and on PortableApps for instance.
So I can get behind the idea of going cold turkey with NoteTab and moving over to Notepad++ at home and at work. When I moved to Windows 7 setting up another editor to replace Notepad directly wasn't something I got around to, and bearing in mind that Windows treats notepad.exe as a protected system file it's a slightly different process these days. You can either unlock controls on various files and replace them (which is likely to break with system updates) or take advantage of a Windows debugging feature as described here.
Copy the below code to C:\Program Files\Notepad++\launcher.vbs
'// Create WSHShell object
Set W = CreateObject("WScript.Shell")
'// Set the working directory to the one this script resides in
'// If the target program doesn't care where it is run from then you don't need the following line
W.CurrentDirectory = LeftB(WScript.ScriptFullName, LenB(WScript.ScriptFullName) - LenB(WScript.ScriptName))
'// Set the target executable
sCmd = "notepad++.exe"
'// Skip the first argument but grab all the rest
If WScript.Arguments.Count > 1 Then
For x = 1 To WScript.Arguments.Count - 1
'// If the argument contains a space then enclose it with ""
If InStrB(WScript.Arguments(x), " ") Then
sCmd = sCmd & " """ & WScript.Arguments(x) & """"
sCmd = sCmd & " " & WScript.Arguments(x)
'// Run the command
'// The number after the command determines how the window should be initially (google WSHShell.Run)
'// The boolean at the end determines whether this script should run the target then exit or wait until the target exits
W.Run sCmd, 1, False
Create a registry key under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\" called "notepad.exe". Create a string value inside called "Debugger" with the value:
wscript.exe "C:\Program Files\Notepad++\launcher.vbs".
And that should do you. And yes, Windows is a nightmarishly complex mess of hacks and compatbility layers by now, as readers of Raymond Chen or indeed anyone who's used it for any length of time will know... this particular one has been around for ages and McAfee was seeing this feature for debugging used to deliver virus/trojan payloads a long time ago.
Notepad++ doesn't natively do a few things that I take for granted in NoteTab, such as the ability to sort lines without workarounds like copying the data over to Excel, but it has a plugin architecture and lots of them to look through... I'm confident I'll find whatever I'm looking for. IIRC, that example one is in the TextFX plugin.