A pedant that hangs out in the dark corner-cases of the web.

Thursday, May 22, 2008

Update: Visual Studio's NIH RegEx Syntax

It looks like this topic came up a couple of years ago with VS2005 at Coding Horror, including a Microsoft reply.

Hey Jeff (and assorted follow-up posters),

I'm the lead program manager for the team that owns editing and the find/replace dialog in Visual Studio. Our team agrees with your post :)

It is a very oddball regex syntax, and as best we can tell it comes from Visual C++ 2.0. We did want to add additional support for .NET 2.0-style regular expressions in the Visual Studio 2005 release, but unfortunately due to time pressures it didn't make the final list of features. We were able to make a number of bug fixes to the existing engine though, to give some improvement over VS 2003.

We do keep this on our list of things we want to fix. Ideally at some point we'll actually build in a nifty little extensibility point so you can wire up any regex engine you want for searches.

Thanks for the feedback!

Neil Enns
Lead Program Manager
Microsoft Visual Studio
— Neil on July 14, 2006 11:15 AM

So, take heart! A Microsoft team member agreed about the stupidity of the NIH RegEx syntax in 2006, so I'm sure we'll see this fixed any day now.

What we need, as pointed out by another commenter, is another pattern option: Regular regular expressions.

Instead, the closest we currently have is couple of VS add-ons to replace the Find and Replace dialog that support normal regex syntax, an unfamiliar UI, broken English, and VS 2005, and no express editions.

No comments: