Editplus反转赋值的正则表达式

在编辑/显示页面会经常用到的。

随便记一下了。


//[ |\t]*([^ ]*)[ ]*=[ ]*([^;]*)
//\2 = \1
        
this.tbName.Text = vendor.Name;
this.ddlType.SelectedValue = vendor.Type.Id.ToString();
this.TestA.Text = vendor.TestA;
this.TestB.Text = vendor.TestB;
this.TestC.Text = vendor.TestC;
this.TestD.Text = vendor.TestD;
this.TestE.Text = vendor.TestE;
this.TestF.Text = vendor.TestF;
this.TestG.Text = vendor.TestG;
this.TestH.Text = vendor.TestH;
this.TestI.Text = vendor.TestI;
this.TestJ.Text = vendor.TestJ;


vendor.Name 
= this.tbName.Text;
vendor.Type.Id.ToString() 
= this.ddlType.SelectedValue;
vendor.TestA 
= this.TestA.Text;
vendor.TestB 
= this.TestB.Text;
vendor.TestC 
= this.TestC.Text;
vendor.TestD 
= this.TestD.Text;
vendor.TestE 
= this.TestE.Text;
vendor.TestF 
= this.TestF.Text;
vendor.TestG 
= this.TestG.Text;
vendor.TestH 
= this.TestH.Text;
vendor.TestI 
= this.TestI.Text;
vendor.TestJ 
= this.TestJ.Text;
原文地址:https://www.cnblogs.com/nonlyli/p/1351000.html