I am using ELMAH to log exceptions that are caught during application execution.
On of the most frequent error messages is like so:
The file '/page/default.aspx' does not exist.
The file. '/error/404/default.aspx' does not exist.
The file. '/another/test/page/default.aspx' does not exist.
Since I can filter certain exceptions from ELMAH by setting regular expressions in web.config, I am trying to write a regular expression to catch messages like this.
This is what I have so far, but gut instinct tells me it's going to fail potentially.
The file '((\/\w)+|(\w))+\.aspx' does not exist.
Could anyone offer any advise on what I can do to make this expression more stable?
It only needs to handle *.aspx pages.