开发者

Visual Studio 2010: How to replace all <%: Resources.A.B %>

开发者 https://www.devze.com 2023-01-31 20:08 出处:网络
Need help with Visual Studio 2010. My problem: I have millions <%: Resources.A.B %> all over开发者_开发问答 in my aspx sites and I just want to change them all to

Need help with Visual Studio 2010.

My problem: I have millions

<%: Resources.A.B %>

all over开发者_开发问答 in my aspx sites and I just want to change them all to

<%: Html.FormatResourceString(Resources.A.B) %>

Yes thats all ;-)

Please note:

I want to do it in Visual Studio 2010 and NOT at runtime!

Replacing

<%: Resources

with

<%: Html.FormatResourceString(Resources

is not the problem, the problem is the ")" and the end.

How can this be made? How must the regular expression look like?


  • Find: \<%\: Resources\.{.+} %\>
  • Replace with: <%: Html.FormatResourceString(Resources.\1) %>

You may also take a look at this article. There are some nice examples at the end.

0

精彩评论

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

关注公众号