批量替换set_:

daohang.set_ChannelName(rowArray[0]["ChannelName"].ToString());
daohang.set_ChannelUrl(rowArray[0]["ChannelUrl"].ToString());

daohang.set_ChannelKill(int.Parse(rowArray[0]["ChannelKill"].ToString()));
                daohang.set_ChannelLogo(rowArray[0]["ChannelLogo"].ToString());
                daohang.set_ChannelRewriteUrl(rowArray[0]["ChannelRewriteUrl"].ToString());
                daohang.set_ChannelOpen(int.Parse(rowArray[0]["ChannelOpen"].ToString()));
                daohang.set_ChannelHeight(int.Parse(rowArray[0]["ChannelHeight"].ToString()));
                daohang.set_ChannelWidth(int.Parse(rowArray[0]["ChannelWidth"].ToString()));
                daohang.set_ChannelTitle(rowArray[0]["ChannelTitle"].ToString());
                daohang.set_ChannelKeyword(rowArray[0]["ChannelKeyword"].ToString());
                daohang.set_ChannelDescription(rowArray[0]["ChannelDescription"].ToString());
                daohang.set_ChannelClose(int.Parse(rowArray[0]["ChannelClose"].ToString()));

set_ChannelDescription等替换成

daohang.ChannelName = rowArray[0]["ChannelName"].ToString();
daohang.ChannelUrl = rowArray[0]["ChannelUrl"].ToString();

使用vs正则替换

.set_{[^\x28]@}\x28{.@}\x29  替换为.\1 = \2;即可

{为分组},[^\x28]为 除(外,@为重复多次,

二 正则批量替换get_

website_0.get_SiteAspxRewrite(), attrbuteCompany_0.get_ChannelKill()

.get_{.@}\x28\x29替换为 .\1

this.on{.@}_0                this.\1

不知道为什么 非要使用@ *不能用

05-07 15:36