This post originated from an RSS feed registered with .NET Buzz
by Scott Watermasysk.
Original Post: The Perverse Art of Regular Expressions
Feed Title: ScottW's ASP.NET WebLog
Feed URL: /error.aspx?aspxerrorpath=/blog/rss.aspx
Feed Description: ASP.NET and Blogging
For those of you who have not seen the .Text code, no ASPX pages exist except for the admin section. All of the blog pages are built on the fly. To decide which page to load, I have a custom set of HttpHandlers/HttpHandlerFactories.
A set of configurable Regular Expressions controls which Handler/Factory to load. I had kept my expressions rather simple, but as more and more blogs are created, I am noticing a need to extend some of the expressions.
Two items I neglected from my original patterns are "." and spaces. Space's will come later. We can focus on "." now.
Earlier today Donny IMed me saying his latest .Text update killed all blogs on DNJ with a "." in the blog name.
In short, I needed a Regular Expression that matched the following cases: