We use regions extensively in our project, and I have a habit of marking them as not finished when I've stubbed them in and am still working on them, like such:
#region Name of Region Here [NOT FINISHED]
Before I started using ReSharper, I'd just do a find-all for "[NOT FINISHED]" to find where I still needed to work on things. However, I see that with ReSharper there is a To-Do list feature that can be generated with regex patterns. I've tried making a pattern to match "NOT FINISHED" so it would give me a nice list of all of these, but so far it isn't working. Right now I have as my pattern "(NOT FINISHED)" (sans quotes), and have checked the boxes for "In comments", "In strings", and "In identifiers" in attempt to make something show up for it. I have a feeling ReSharper isn't matching because the would-be match is in a #region directive. Once I took it out and put it in a comment on the next line down like this:
#region Name of Region Here
ReSharper picked it up and put it into my list perfectly. I would like to keep my NOT FINISHED in with the name of the region, since then when the region gets collapsed I can still see that it is unfinished. Does anyone know of a way to get these patterns to match this way?
On somewhat of a side-note, when I inspected what the other patterns were using for regex, I came across what I'm not familiar with: the use of <TAG>, like in the Note regex: (?<=\W|^)(?<TAG>NOTE)(\W|$)(.*)
I understand the rest of the regex, except for the question mark immediately preceding <TAG>, as it seems to me that should be stating that the regex is looking for 0 or 1 of the parenthesis preceding it, yet that would seem to be invalid syntax and definetly NOT what it's actually doing. Could anyone help explain this for me?