I’ve got Jeff Atwood to thank for an awful lot of things he posts over at Coding Horror, but this post in particular has made my day. I’ve often wondered why it is that the Find/Replace RegEx engine built into the VS.NET IDE uses a wilfully different RegEx flavour to the .NET framework classes. I use The Regulator for my regular expression building/testing, but I’ve always found it confusing and irritating that I can’t take a regex from The Regulator and plug it into a standard VS.NET IDE Find/Replace.

Now at least I know why, as it seems the VS.NET Lead Program Manager thinks enough of Jeff’s blog to shed some light on the matter:

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.

Extensibility point schmextensibility point. Just plug in the regular framework classes (but leave the great shortcuts like :q). Thanks :)

© 2014 ZephyrBlog Suffusion theme by Sayontan Sinha