开发者

Using standard .NET Regex in Visual Studio's Find dialog

As most of you probably know, the regular expressions used in Visual Studio's Find dialog are not the same as .NET Regex. This is a major PITA to me, and I often resort to external tools to search my code with regexes.

So, I have two questions:

  • Why on earth did the VS team introduce yet another new, non-standard regex syntax? Couldn't they use the existing .NET Regex class? I can't think of any good reason for this...
  • Is there a VS extension out there that would allow me to use the standard regex syntax in the Find dialog?

EDIT: I found two related suggestions on Connect:

  • Please consider using the same regex syntax for Find/Replace and the Regex class
  • Modify Visual Studio Find And Replace To Accept other Non MS Text Matching Engines

The second one is actually more interesting, since it would provide an extensible solution...

There are also a few VS2010 extensions (like this one) that allow searching with regexes, but none of them integrates into the standard Find dialog, and they don't have the "find in files" featu开发者_开发百科re.


Visual Studio 6 has Find & Replace using Regular Expressions. As such, it would be difficult for it to use a future product/framework to perform such a search

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜