Edit: While I refer to RegEx in my background, I'm not looking for you to fix my RegExp (thanks for trying though) - rather I want to know "how do I abort a search/replace in NotePad++".
Environment
I'm using latest version of NPP (v.5.9.6.2) on Windows 7 64 bit
Background (aka "The Problem")
Occasionally I use NPP to manipulate bits of text and more often than not I use regular expressions during that process. While it is no criticism of the product (how can it be?), Notepad++ allows me to do stupid things that don't behave as I intended. Case in point, I had a long list of values which I wanted to enclose in quote marks. I entered an accidentally aggressive expression and it caused an infinite loop.
The reason for the loop is immaterial and is not the point of my question - I've made this mistake more than once - i know it doesn't work, but I forget and months later will do the same thing again.
The problem is that when NotePad++ goes into this infinite loop, trying to complete the imposisble, I am effectively locked out of all of my unsaved documents and forced to kill the NPP process.
Question
I can't find anything documented in Help or in the NPP "forum" but does anyone know of a way for me to abort a search and replace, such as in the aforementioned scenario, thereby allowing me to back out of my mistake and more importantly, save all of my other documents?
\$
with'
?$
was intended to match the end of the line and place a quote mark there (rather than, as you imply, looking for an explicit dollar sign and replacing that with quote). In any case though, it is the ability to abort the search that I am looking for really :)\b(?=$)
with'
?/^(.*?)$/
with"'$1'"
works. Have you tried that?