Notepad++ non-greedy regular expressions

Update: from version 5.9 (build time Mar, 31. 2011), Notepad++ supports non greedy regular expressions (new scintilla 2.5).


I did the following with Notepad++ V6.1.5 (It has now PCRE regex engine):

a.+?c

and got 2 parts (abc and adc)

Lazy(non-greedy) searches are now possible.


NOTE: This accepted answer is obsolete as of March 31, 2011. Notepad++ v5.9 and higher now support non-greedy regular expressions.

Please see an updated answer here or here.


Notepad++ doesn't support the lazy ? modifier. Instead, you can specify what you don't want:

a[^c]+c

Which specifies: match a, followed by one or more character that isn't c, followed by c. This will match abc and adc.