Visual Studio查找和替换窗口中的正则表达式 [英] Regular Expression in Find and Replace Window Of Visual Studio
本文介绍了Visual Studio查找和替换窗口中的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果我使用Visual Studio中的查找和替换"窗口找到字符串,我想注释或删除代码中的一行
I want to comment or delete a line in my code if i find a string using Find and Replace window in Visual Studio
Button1.Animation=30
Button2.Animation=30
Button3.Animation=30
Button4.Animation=30
因此,如果我在查找框中找到".Animation",则必须替换
这样的行
So here if i found ".Animation" in my find box then i have to replace the line like
'Button1.Animation=30
'Button2.Animation=30
'Button3.Animation=30
'Button4.Animation=30
推荐答案
我不知道您需要的确切表达方式,但我发现 ^ ]资源,如果您还没有看到它的话,可能会为您提供帮助.
CP上还有一个小技巧/窍门/文章.它的评价不高,我还没有仔细阅读,但是那里也可能有一些很好的信息供您参考. Visual Studio查找/替换正则表达式用法 [
I don''t know the exact expression you would need, but I found this[^] resource that may help you if you haven''t seen it yet.
There is also a small tip/trick/article here on CP. It isn''t highly rated and I haven''t read it too carefully yet, but there may be some good info in there too for you. Visual Studio Find/Replace Regular Expression Usage[^]
查找(关闭情况):{button.\.animation.*=.*30}
替换:\''\1
find (case off) :{button.\.animation.*=.*30}
replace :\''\1
这篇关于Visual Studio查找和替换窗口中的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文