Can someone give me an example / explanation of what this regex does:
(?![#$])
This is the part <%(?![#$])(([^%]*)%)*?>that ASP.NET uses to analyze blocks of code on the server side. I understand the second part of the expression, but not the first.
I checked the documentation and found what the (?! ...)negative back side of zero width means, but I'm not quite sure I understand what that means. Any input I've tried so far that looks like <% ... %>it seems to work - I wonder why this is the first subexpression even there.
Edit:
I came up with this expression to select ASP.NET: expressions <%.+?%>, after which I found the one that Microsoft made (the above full expression). Iām trying to understand why they chose this particular expression when it seems a lot easier to me. (I am trying to check if my expression does not ignore some boundary conditions that MS does not.)
source
share