Question: I'm trying to select a block of code between 2 comment tags like this:

```
<!-- begin answers -->
   ...[code]
<!-- end answers -->

```

I've tried something along the lines of `<!-- begin answers -->.*<!-- end answers -->` but my regex knowledge is fairly limited. My knowledge of Notepad++'s find and replace is very limited as well, but the reason I'm using it is because of the "Replace Across Open Files" option deems to be very useful. Reason for this because I'm doing a search/replace on about 4000 files.

The code between these comments may vary somewhat (spaces, whitespace) so I need something a little flexible to handle it.

Thanks!

Answer: 
The regular expression you tried should work but unfortunately, the regex engine that Notepad++ uses (Scintilla) cannot match across new lines. So there is no way of doing it. 
This limitation is documented [here](http://www.scintilla.org/SciTEDoc.html). Also it only supports very basic expressions. And you cannot select just the text between the comments (without selecting the comments too) because look-ahead and look-behind assertions are not supported.
Using the below in Find & Replace (***Regular expression*** and ***.matches newline*** selected) works for me:

```
<!-- begin answers -->(.*?)<!-- end answers -->

```