Happy toast

Regex Storm Retrospective

  1. .net
  2. regex
  3. regex storm


I’m one of those weird developers that really enjoys regular expressions. So much so, that sometime in late 2009, I started a project to make the best online regex testing site I could: Regex Storm.

I decided on 2 goals: that it would be .NET and that it would not rely on any browser plug-ins.

I wanted it to run on the .NET regex engine because I felt there weren’t enough regex testers made specifically for .NET developers. Most run on JavaScript, which is fine 90% of the time, but when you get into the really advaced stuff then you start to see differences (like balancing group definitions, supported by .NET but not by JavaScript).

I also wanted it to be free of plug-ins, mostly as a personal preference. This made things more challenging, since I had to write a lot of complex Ajax code to communicate with the server, whereas using Silverlight would have let me do everything on the client. But I’m not a fan of forcing users to install extra programs just to use a web page. Plus, I think plug-ins introduce an added layer of uncertainty, which turned out to be exactly the case with Silverlight being phased out.


So I spent way too many hours learning every aspect of regular expressions and creating the most complete regex tester I could. I got a lot of positive feedback, co-workers started using it regularly, and I even found myself using it extensively to craft my own regular expressions.

I also kept a development blog for it.

But as the months rolled on, I moved on to other things. Regex Storm is still fully functional today, but it hasn’t seen any updates or new features in many months.

Pain Points

If I had to pick the most painful thing about this project, it was the inline highlighting. The tester highlights regex matches in the input box as you type. It looks very natural, but the implementation was anything but. You can’t style individual spans of text in a textarea, so I had to create the illusion with carefully layered elements and some crazy JavaScript. You can read about the details here.

It was terribly frustrating, because it required so much precision to bring everything together. For example, did you know that Safari adds an extra 3 pixels of padding to the inside left of a textarea? Or that Firefox positions the scrollbar of a textarea inside of the padding? The list goes on. A lot of people like to harp exclusively on IE (and it does have its problems, of course), but this project made me realize that every browser, even Opera with its track record of being super standards compliant, has its quirks.

End Result

Overall, I consider Regex Storm a big success. It looks good, works well, and I learned a hell of a lot. If I were to do it over again, I would definitely do some things differently (for example, the dependence on .NET’s UpdatePanel control is not very efficient). That said, I don’t see myself returning to this project anytime soon, if ever. Too many other things to do. Regardless, I learned more about regular expressions than I ever thought I would, and I was able to add a great project to my portfolio.

Thank you!