0

Looking for some RegEx advice. Working on trying to find hard coded strings in a C# .net app. All the properly coded strings in the aspx pages look like so:

Text="<%$ Resources:Global, Delete %>"
I'm trying to find any string that would look like Text="Delete" or any hard coded strings. I've came up with Text=\"(?!<%$ )?\" to basically say find any string that does start out with text="<%$" but to no avail. Advice?

4

2 回答 2

0

“$” 表示正则表达式语法的其他含义(行尾)。逃脱它。

而且你的意思是Text=\"(?!\<%\$ )[^\"]*\"?这个有效(经过测试)。

于 2013-10-29T12:24:43.470 回答
0

试试下面的表达式

"(?:[^\\"]+|\\.)*"
于 2013-10-29T12:31:51.573 回答