Quote:
Originally Posted by meme
|
It doesn't match from your cursor location. It matches from the beginning of the text. So since (?s)Stoker.*?Release matches from line 9 to 31 that is the only match.
The .*Release also has the same issue because it starts matching a the beginning of the line so if your cursor is at the start of class then you're already past the start point for the match.
So what this really comes down to is how to determine what a match is. I'm looking at the entire document beginning to end right now. Would it be better to do a forward and then backward search from the cursor position?
The reason I went with a beginning to end search is you will always get the same count no matter where you are in the document. Going by cursor position (as shown with this example) you will get different matching results depending on where your cursor is due to the nature of regex's including or not including text.