How do I activate regex search in Visual Studio 2010?

孤街醉人 提交于 2019-12-25 05:25:09

问题


This could be an embarassingly easy quesiton but If I search the following using the find dialogue of VS2010 with \{.*?\} I don't find anything even though it should find { return Stock ==5;}

    internal bool IsUnableToBeSet //{}
    {
        get { return Stock == 5; }
    }

if I search this in NotePad++ it works. What am I doing wrong in the VS2010 environment? (I've unchecked all options except for "Use Regular expressions" )

[EDIT]

I've just read the coding horror site for VS2005 but is this still the case and can I convert the expressions easily?


回答1:


VS2010 still has the custom regex syntax, but VS2012 has switched to the standard syntax. For VS2010, the query you want would be

\{.@\}


来源:https://stackoverflow.com/questions/13019786/how-do-i-activate-regex-search-in-visual-studio-2010

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!