如何在Visual Studio中使用正则表达式查找没有标题的所有msgbox [英] How to use regular expressions to find all msgboxes without a title in visual studio

查看:94
本文介绍了如何在Visual Studio中使用正则表达式查找没有标题的所有msgbox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我在Visual Studio中拥有一个非常大的解决方案,拥有超过13k的msgbox。其中一些将具有没有标题部分的消息框(多年来完成)(参见例如1)。我们正在努力纠正所有这些(例如2),以便始终如一地显示相同的标题。



例如:

1)msgbox (这里的一些文字)

2)msgbox(这里的一些文字,MsgBoxStyle.Exclamation,SomeGlobalVariable)



按钮可以变化。

我想找到所有那些有 msgbox(+除了逗号+ 之外的任何字符)
$的msgbox b $ b



提前谢谢

Tony



我尝试了什么:



我尝试使用[^,]排除逗号但无效。

任何帮助将不胜感激。

解决方案

试试这个:

 msgbox \([^,] *\)


Hi all,

I have a very large solution in Visual Studio with over 13k msgboxes. Some of these will have message boxes (done over the years) that do not have the Title part (see eg 1). We are trying to correct all these (like eg 2) in order to display the same title consistently.

example:
1) msgbox("some text in here")
2) msgbox("some text in here",MsgBoxStyle.Exclamation, SomeGlobalVariable)

The buttons can vary.
I want to find all those msgboxes that have "msgbox(" + any characters apart from comma + ")"


Thank you in advance
Tony

What I have tried:

I have tried using [^,] to exclude commas but to no avail.
Any help would be greatly appreciated.

解决方案

Try this:

msgbox\("[^,]*"\)


这篇关于如何在Visual Studio中使用正则表达式查找没有标题的所有msgbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆