EditPlus中的正規表示式 實戰(1)
entity.JIANCHARQ=null; entity.YUYUERQ=null; entity.NIAODANB=null; entity.XUETANGPJ=null; entity.JIANCHADWBM=null; entity.JIANCHAJG=null; entity.JIANCHAJGMS=null; entity.MOCIYJ=null; entity.YUCHANQI=null; entity.SHOUJIANYZ=null; entity.YUNCI=null; entity.CHANCI=null; entity.SHOUJIANYT=null; entity.CHUXUE=null; entity.JUTU=null; entity.FARE=null; entity.BINGDUGR=null; entity.YUNQIANFBYY=null; entity.RENSHENGYCQK=null; entity.SHENGAO=null; entity.TIZHONG=null; entity.GONGGAO=null; entity.JICHUSZY=null; entity.XIN=null; entity.XINXS=null; entity.FEI=null; entity.FEIXS=null; entity.JICHUSSY=null; entity.FUKEJC=null; entity.YINDAOY=null; entity.YINDAOYXS=null; entity.GONGJINGY=null; entity.GONGJINGYXS=null; entity.SHUANGYDZG=null; entity.SHUANGYDZGXS=null; entity.ZIGONGJL=null; entity.ZIGONGJLXS=null; entity.FUJIANZW=null; entity.FUJIANZWXS=null; entity.GONGGAOFH=null; entity.ZIGONGXS=null; entity.QITAFKJCXS=null; entity.XUEHONGDB=null; entity.NIAODANBPJ=null; entity.NIAOTANGPJ=null; entity.JIATAIDB=null; entity.GPT_ALTPJ=null; entity.ABOXUEXING=null; entity.MEIDU=null; entity.MEIDUJC=null; entity.FMEIDUJC=null; entity.FMEIDU=null; entity.CHANQIANSC=null; entity.HIV=null; entity.YGBMKYDX=null; entity.BAIDAI=null; entity.GONGXINGT=null; entity.JUXIBBD=null; entity.FENGZHENBD=null; entity.SHIYANSJCQT=null; entity.SHIYANSJCQTJG=null; entity.GAOWEIYS=null; entity.GAOWEIXX=null; entity.CHULIZD=null; entity.GAOWEIBM=null; entity.YIGANKY=null; entity.BINGGAN=null; entity.YESUAN=null; entity.TIEDANB=null; entity.B12=null; entity.DANCHUNPZBZ=null; entity.FUZHUSZ=null; entity.JIANCHAYS=null; entity.RHXUEXING=null; entity.RPRJC=null; entity.DIDU=null; entity.GAOWEIDJ=null; entity.GAOWEIPFVALUE=null; entity.LURUR=null; entity.JIANCHADW=null; entity.YINDAOFM=null; entity.POUGONGC=null; entity.XIANBINGS=null; entity.XIANBINGSXS=null; entity.JIWANGS=null; entity.JIWANGSXS=null; entity.BCRSZYYCQK=null; entity.BCRSZYYCQKXS=null; entity.BCRSZYYCQKXSMC=null; entity.BCHYFS=null; entity.TIZHONGZS=null; entity.XINLV=null; entity.XINL=null; entity.XINZANGZY=null; entity.XINZANGZYXS=null; entity.QITAYC=null; entity.QITAYCXS=null; entity.WAIYIN=null; entity.WAIYINXS=null; entity.YINDAOQJD=null; entity.YINDAOFMW=null; entity.QIAJIJJ_ONE=null; entity.QIAJIJJ_TWO=null; entity.DICHIWJ=null; entity.CHUKOUHJ=null; entity.BAOXIBJS=null; entity.XIEXIAOBJS=null; entity.XUECHANGGUIQT=null; entity.NIAOTANG=null; entity.NIAOTONGT=null; entity.NIAOQIANX=null; entity.NIAOBAIXQ=null; entity.NIAOCHUANGGUIQT=null; entity.XUEQINGGBZAM=null; entity.XUEQINGGCZAM=null; entity.BAIDB=null; entity.ZONGDANHS=null; entity.JIEHEHS=null; entity.XUEQINGJQ=null; entity.XUENIAOSD=null; entity.YINDAOFMWXS=null; entity.SHAYANYYT=null; entity.LINQIEJJC=null; entity.YIGANWX=null; entity.YIXGYBMKT=null; entity.YIXGYEKY=null; entity.YIXGYEKT=null; entity.YIXGYHXKT=null; entity.BCHAO=null; entity.XINDIANTU=null; entity.JIAZHUANGXIANGN=null; entity.TSH=null; entity.FT3=null; entity.FT4=null; entity.TT3=null; entity.TT4=null; entity.ATG=null; entity.ATPO=null; entity.GONGJINGTLXBJC=null; entity.ZONGTIPG=null; entity.BAOJIANZD=null; entity.BAOJIANZDMS=null; entity.YOUWUZHUANZHEN=null; entity.ZHUANZHENYUANYIN=null; entity.ZHUANZHENJJBH=null; entity.ZHUANZHENJJ=null; entity.ZHUANZHENKS=null; entity.ZHIYE=null; entity.MINZU=null; entity.WENHUACD=null; entity.MINZUMC=null; entity.SFYUNFUJZS=null; entity.YICHUANXJBS=null; entity.YICHUANXJBSXS=null; entity.JINGSHENBBS=null; entity.JINGSHENBBSXS=null; entity.ZHIZHANG=null; entity.ZHIZHANGXS=null; entity.JIXING=null; entity.JIXINGXS=null; entity.YUNFUQTJZS=null; entity.ZFSFJZS=null; entity.ZFYICHUANXJBS=null; entity.ZFYICHUANXJBSXS=null; entity.ZFJINGSHENBBS=null; entity.ZFJINGSHENBBSXS=null; entity.ZFZHIZHANG=null; entity.ZFZHIZHANGXS=null; entity.ZFJIXING=null; entity.ZFJIXINGXS=null; entity.ZFQTJZS=null; entity.GERENS=null; entity.XIYAN=null; entity.XIYANXS=null; entity.YINJIU=null; entity.YINJIUXS=null; entity.FUYONGYW=null; entity.FUYONGYWXS=null; entity.YAOWUGMS=null; entity.YAOWUGMSXS=null; entity.JIECHUYDYHWZ=null; entity.JIECHUYDYHWZXS=null; entity.JIECHUFSX=null; entity.JIECHUFSXXS=null; entity.WAISHANGS=null; entity.WAISHANGSXS=null; entity.QITAGRS=null; entity.SHOUSHUS=null; entity.FUKESHOUSHUS=null; entity.FUKESHOUSHUSXS=null; entity.QITASHOUSHUS=null; entity.QITASHOUSHUSXS=null; entity.CHUCHAONL=null; entity.ZHOUQIOMIX=null; entity.ZHOUQIOMAX=null; entity.JINGQI=null; entity.JINGQIMAX=null; entity.BIYUNS=null; entity.BIYUNSXS=null; entity.YUNCHANSHI=null; entity.YUNFUQTJZS_RAD=null; entity.ZFQTJZS_RAD=null; entity.QITAGRS_RAD=null; entity.JIWANGSXSMC=null; entity.ZONGTIPGXS=null; entity.SFYJSANDBYS=null; entity.SFYWRSANDHY=null; entity.SFYWTGJC=null; entity.SFYWPGWCL=null; entity.SFYWFZJC=null; entity.SFYWGWPDANDBJZD=null; entity.SFYWZZANDSF=null; entity.FBKH=null; entity.FUNVID=null; entity.FUWUJGBH=null; entity.ID=null; entity.TIANBIAOR=null; entity.TIANBIAORQ=null; entity.XUETANGZHI=null; entity.QITAJIANCHASX=null; entity.QTGAOWEIYS=null; entity.YONGHUBH=null; entity.YESUANXX=null; entity.SFFUYONGYS=null; entity.FYKSISHISJ=null; entity.FYQINGK=null; entity.SFTINHZFY=null; entity.TINGYYY=null; entity.ZHIZHANGCD=null; entity.ZFZHIZHANGCD=null; entity.SHIFOUWX=null; entity.BAOJIANCH=null;
如上程式碼要編寫成如下格式:
entity.JIANCHARQ = JIANCHARQ;; entity.YUYUERQ = YUYUERQ;; entity.NIAODANB = NIAODANB;; entity.XUETANGPJ = XUETANGPJ;; entity.JIANCHADWBM = JIANCHADWBM;; entity.JIANCHAJG = JIANCHAJG;; entity.JIANCHAJGMS = JIANCHAJGMS;; entity.MOCIYJ = MOCIYJ;; entity.YUCHANQI = YUCHANQI;; entity.SHOUJIANYZ = SHOUJIANYZ;; entity.YUNCI = YUNCI;; entity.CHANCI = CHANCI;; entity.SHOUJIANYT = SHOUJIANYT;; entity.CHUXUE = CHUXUE;; entity.JUTU = JUTU;; entity.FARE = FARE;; entity.BINGDUGR = BINGDUGR;; entity.YUNQIANFBYY = YUNQIANFBYY;; entity.RENSHENGYCQK = RENSHENGYCQK;; entity.SHENGAO = SHENGAO;; entity.TIZHONG = TIZHONG;; entity.GONGGAO = GONGGAO;; entity.JICHUSZY = JICHUSZY;; entity.XIN = XIN;; entity.XINXS = XINXS;; entity.FEI = FEI;; entity.FEIXS = FEIXS;; entity.JICHUSSY = JICHUSSY;; entity.FUKEJC = FUKEJC;; entity.YINDAOY = YINDAOY;; entity.YINDAOYXS = YINDAOYXS;; entity.GONGJINGY = GONGJINGY;; entity.GONGJINGYXS = GONGJINGYXS;; entity.SHUANGYDZG = SHUANGYDZG;; entity.SHUANGYDZGXS = SHUANGYDZGXS;; entity.ZIGONGJL = ZIGONGJL;; entity.ZIGONGJLXS = ZIGONGJLXS;; entity.FUJIANZW = FUJIANZW;; entity.FUJIANZWXS = FUJIANZWXS;; entity.GONGGAOFH = GONGGAOFH;; entity.ZIGONGXS = ZIGONGXS;; entity.QITAFKJCXS = QITAFKJCXS;; entity.XUEHONGDB = XUEHONGDB;; entity.NIAODANBPJ = NIAODANBPJ;; entity.NIAOTANGPJ = NIAOTANGPJ;; entity.JIATAIDB = JIATAIDB;; entity.GPT_ALTPJ = ALTPJ;; entity.ABOXUEXING = ABOXUEXING;; entity.MEIDU = MEIDU;; entity.MEIDUJC = MEIDUJC;; entity.FMEIDUJC = FMEIDUJC;; entity.FMEIDU = FMEIDU;; entity.CHANQIANSC = CHANQIANSC;; entity.HIV = HIV;; entity.YGBMKYDX = YGBMKYDX;; entity.BAIDAI = BAIDAI;; entity.GONGXINGT = GONGXINGT;; entity.JUXIBBD = JUXIBBD;; entity.FENGZHENBD = FENGZHENBD;; entity.SHIYANSJCQT = SHIYANSJCQT;; entity.SHIYANSJCQTJG = SHIYANSJCQTJG;; entity.GAOWEIYS = GAOWEIYS;; entity.GAOWEIXX = GAOWEIXX;; entity.CHULIZD = CHULIZD;; entity.GAOWEIBM = GAOWEIBM;; entity.YIGANKY = YIGANKY;; entity.BINGGAN = BINGGAN;; entity.YESUAN = YESUAN;; entity.TIEDANB = TIEDANB;; entity.B12=null; entity.DANCHUNPZBZ = DANCHUNPZBZ;; entity.FUZHUSZ = FUZHUSZ;; entity.JIANCHAYS = JIANCHAYS;; entity.RHXUEXING = RHXUEXING;; entity.RPRJC = RPRJC;; entity.DIDU = DIDU;; entity.GAOWEIDJ = GAOWEIDJ;; entity.GAOWEIPFVALUE = GAOWEIPFVALUE;; entity.LURUR = LURUR;; entity.JIANCHADW = JIANCHADW;; entity.YINDAOFM = YINDAOFM;; entity.POUGONGC = POUGONGC;; entity.XIANBINGS = XIANBINGS;; entity.XIANBINGSXS = XIANBINGSXS;; entity.JIWANGS = JIWANGS;; entity.JIWANGSXS = JIWANGSXS;; entity.BCRSZYYCQK = BCRSZYYCQK;; entity.BCRSZYYCQKXS = BCRSZYYCQKXS;; entity.BCRSZYYCQKXSMC = BCRSZYYCQKXSMC;; entity.BCHYFS = BCHYFS;; entity.TIZHONGZS = TIZHONGZS;; entity.XINLV = XINLV;; entity.XINL = XINL;; entity.XINZANGZY = XINZANGZY;; entity.XINZANGZYXS = XINZANGZYXS;; entity.QITAYC = QITAYC;; entity.QITAYCXS = QITAYCXS;; entity.WAIYIN = WAIYIN;; entity.WAIYINXS = WAIYINXS;; entity.YINDAOQJD = YINDAOQJD;; entity.YINDAOFMW = YINDAOFMW;; entity.QIAJIJJ_ONE = ONE;; entity.QIAJIJJ_TWO = TWO;; entity.DICHIWJ = DICHIWJ;; entity.CHUKOUHJ = CHUKOUHJ;; entity.BAOXIBJS = BAOXIBJS;; entity.XIEXIAOBJS = XIEXIAOBJS;; entity.XUECHANGGUIQT = XUECHANGGUIQT;; entity.NIAOTANG = NIAOTANG;; entity.NIAOTONGT = NIAOTONGT;; entity.NIAOQIANX = NIAOQIANX;; entity.NIAOBAIXQ = NIAOBAIXQ;; entity.NIAOCHUANGGUIQT = NIAOCHUANGGUIQT;; entity.XUEQINGGBZAM = XUEQINGGBZAM;; entity.XUEQINGGCZAM = XUEQINGGCZAM;; entity.BAIDB = BAIDB;; entity.ZONGDANHS = ZONGDANHS;; entity.JIEHEHS = JIEHEHS;; entity.XUEQINGJQ = XUEQINGJQ;; entity.XUENIAOSD = XUENIAOSD;; entity.YINDAOFMWXS = YINDAOFMWXS;; entity.SHAYANYYT = SHAYANYYT;; entity.LINQIEJJC = LINQIEJJC;; entity.YIGANWX = YIGANWX;; entity.YIXGYBMKT = YIXGYBMKT;; entity.YIXGYEKY = YIXGYEKY;; entity.YIXGYEKT = YIXGYEKT;; entity.YIXGYHXKT = YIXGYHXKT;; entity.BCHAO = BCHAO;; entity.XINDIANTU = XINDIANTU;; entity.JIAZHUANGXIANGN = JIAZHUANGXIANGN;; entity.TSH = TSH;; entity.FT3=null; entity.FT4=null; entity.TT3=null; entity.TT4=null; entity.ATG = ATG;; entity.ATPO = ATPO;; entity.GONGJINGTLXBJC = GONGJINGTLXBJC;; entity.ZONGTIPG = ZONGTIPG;; entity.BAOJIANZD = BAOJIANZD;; entity.BAOJIANZDMS = BAOJIANZDMS;; entity.YOUWUZHUANZHEN = YOUWUZHUANZHEN;; entity.ZHUANZHENYUANYIN = ZHUANZHENYUANYIN;; entity.ZHUANZHENJJBH = ZHUANZHENJJBH;; entity.ZHUANZHENJJ = ZHUANZHENJJ;; entity.ZHUANZHENKS = ZHUANZHENKS;; entity.ZHIYE = ZHIYE;; entity.MINZU = MINZU;; entity.WENHUACD = WENHUACD;; entity.MINZUMC = MINZUMC;; entity.SFYUNFUJZS = SFYUNFUJZS;; entity.YICHUANXJBS = YICHUANXJBS;; entity.YICHUANXJBSXS = YICHUANXJBSXS;; entity.JINGSHENBBS = JINGSHENBBS;; entity.JINGSHENBBSXS = JINGSHENBBSXS;; entity.ZHIZHANG = ZHIZHANG;; entity.ZHIZHANGXS = ZHIZHANGXS;; entity.JIXING = JIXING;; entity.JIXINGXS = JIXINGXS;; entity.YUNFUQTJZS = YUNFUQTJZS;; entity.ZFSFJZS = ZFSFJZS;; entity.ZFYICHUANXJBS = ZFYICHUANXJBS;; entity.ZFYICHUANXJBSXS = ZFYICHUANXJBSXS;; entity.ZFJINGSHENBBS = ZFJINGSHENBBS;; entity.ZFJINGSHENBBSXS = ZFJINGSHENBBSXS;; entity.ZFZHIZHANG = ZFZHIZHANG;; entity.ZFZHIZHANGXS = ZFZHIZHANGXS;; entity.ZFJIXING = ZFJIXING;; entity.ZFJIXINGXS = ZFJIXINGXS;; entity.ZFQTJZS = ZFQTJZS;; entity.GERENS = GERENS;; entity.XIYAN = XIYAN;; entity.XIYANXS = XIYANXS;; entity.YINJIU = YINJIU;; entity.YINJIUXS = YINJIUXS;; entity.FUYONGYW = FUYONGYW;; entity.FUYONGYWXS = FUYONGYWXS;; entity.YAOWUGMS = YAOWUGMS;; entity.YAOWUGMSXS = YAOWUGMSXS;; entity.JIECHUYDYHWZ = JIECHUYDYHWZ;; entity.JIECHUYDYHWZXS = JIECHUYDYHWZXS;; entity.JIECHUFSX = JIECHUFSX;; entity.JIECHUFSXXS = JIECHUFSXXS;; entity.WAISHANGS = WAISHANGS;; entity.WAISHANGSXS = WAISHANGSXS;; entity.QITAGRS = QITAGRS;; entity.SHOUSHUS = SHOUSHUS;; entity.FUKESHOUSHUS = FUKESHOUSHUS;; entity.FUKESHOUSHUSXS = FUKESHOUSHUSXS;; entity.QITASHOUSHUS = QITASHOUSHUS;; entity.QITASHOUSHUSXS = QITASHOUSHUSXS;; entity.CHUCHAONL = CHUCHAONL;; entity.ZHOUQIOMIX = ZHOUQIOMIX;; entity.ZHOUQIOMAX = ZHOUQIOMAX;; entity.JINGQI = JINGQI;; entity.JINGQIMAX = JINGQIMAX;; entity.BIYUNS = BIYUNS;; entity.BIYUNSXS = BIYUNSXS;; entity.YUNCHANSHI = YUNCHANSHI;; entity.YUNFUQTJZS_RAD = RAD;; entity.ZFQTJZS_RAD = RAD;; entity.QITAGRS_RAD = RAD;; entity.JIWANGSXSMC = JIWANGSXSMC;; entity.ZONGTIPGXS = ZONGTIPGXS;; entity.SFYJSANDBYS = SFYJSANDBYS;; entity.SFYWRSANDHY = SFYWRSANDHY;; entity.SFYWTGJC = SFYWTGJC;; entity.SFYWPGWCL = SFYWPGWCL;; entity.SFYWFZJC = SFYWFZJC;; entity.SFYWGWPDANDBJZD = SFYWGWPDANDBJZD;; entity.SFYWZZANDSF = SFYWZZANDSF;; entity.FBKH = FBKH;; entity.FUNVID = FUNVID;; entity.FUWUJGBH = FUWUJGBH;; entity.ID = ID;; entity.TIANBIAOR = TIANBIAOR;; entity.TIANBIAORQ = TIANBIAORQ;; entity.XUETANGZHI = XUETANGZHI;; entity.QITAJIANCHASX = QITAJIANCHASX;; entity.QTGAOWEIYS = QTGAOWEIYS;; entity.YONGHUBH = YONGHUBH;; entity.YESUANXX = YESUANXX;; entity.SFFUYONGYS = SFFUYONGYS;; entity.FYKSISHISJ = FYKSISHISJ;; entity.FYQINGK = FYQINGK;; entity.SFTINHZFY = SFTINHZFY;; entity.TINGYYY = TINGYYY;; entity.ZHIZHANGCD = ZHIZHANGCD;; entity.ZFZHIZHANGCD = ZFZHIZHANGCD;; entity.SHIFOUWX = SHIFOUWX;; entity.BAOJIANCH = BAOJIANCH;;
在沒用這個方式之前我手動一個一個替換來達到目的,數量比較少的情況下手動來的快.
現在系統欄位有幾百個的時候,這顯然不是明智的辦法.用正則來達到手動替換更體現了我們的價值.
先手動整理下格式去掉空格
然後替換
查詢項輸入:
([A-Z]*[A-Z])=(null)
替換項輸入:
\1=\1
語義分析:
([A-Z]*[A-Z])=(null) 等同於 [A-Z]*[A-Z] = null 加上"()"為分組的意思
([A-Z]*[A-Z]) 為組1 語法為 \1 代表分組1
(null) 為組2 語法為 \2 代表分組2
\1=\1 即上面公式替換為下面的公式,下面公式為上面公式中,分組1=分組1 這種格式.
[A-Z]*[A-Z] = null 類似 字母開頭中間無限字母結束 加上 "=null" 的都是符合要求的.
擴充練習:
1.上面操作已經替換成功後,做個可逆操作正規表示式還原回去.
查詢項輸入:
([A-Z]*[A-Z])=([A-Z]*[A-Z])
替換項輸入:
\1=null
2.刪除註釋諸如
///預約日期 entity.YUYUERQ=YUYUERQ; ///尿蛋白 entity.NIAODANB=NIAODANB; ///血糖 entity.XUETANGPJ=XUETANGPJ; ///檢查單位 entity.JIANCHADWBM=JIANCHADWBM; ///檢查結果 entity.JIANCHAJG=JIANCHAJG; ///檢查結果描述 entity.JIANCHAJGMS=JIANCHAJGMS;
查詢項輸入:
[/][/][/].*
替換項輸入: 輸入空 然後 右鍵刪除空行即可
以上所述是小編給大家介紹的EditPlus中的正規表示式 實戰(1),希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回覆大家的。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70015105/viewspace-2872421/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- EditPlus中的正規表示式實戰(5)
- EditPlus中的正規表示式實戰(6)
- 實戰JS正規表示式JS
- js中的正規表示式(1)JS
- JavaScript中的正規表示式(1) (轉)JavaScript
- 正規表示式詳解及實戰
- 正規表示式-基礎實戰篇
- java中的正規表示式Java
- JS中的正規表示式JS
- iOS中的正規表示式iOS
- Oracle中的正規表示式Oracle
- oracle 整理 正規表示式1Oracle
- Java 中 Emoji 的正規表示式Java
- Oracle sql中的正規表示式OracleSQL
- 【正規表示式】常用的正規表示式(數字,漢字,字串,金額等的正規表示式)字串
- JavaScript學習1:正規表示式JavaScript
- editplus和ultraedit刪除空行(ultraedit其它常用正規表示式替換)
- 正規表示式實踐文章
- JS實現正規表示式JS
- 正規表示式在Java中的使用Java
- 淺談js中的正規表示式JS
- python中的re(正規表示式)Python
- oracle中的正規表示式(regular expression)OracleExpress
- 正規表示式中的特殊字元(轉)字元
- JavaScript中的正規表示式(2) (轉)JavaScript
- UltraEdit (UE)中的常用正規表示式
- 正規表示式
- Linux中基本正規表示式Linux
- JavaScript的正規表示式JavaScript
- JS 的正規表示式JS
- 20個實用正規表示式
- JS常用正規表示式及驗證時間的正規表示式JS
- grep 命令系列:grep 中的正規表示式
- Linux之grep中的正規表示式Linux
- 正規表示式匹配html中的圖片HTML
- 正規表示式在iOS中的運用iOS
- MongoDB正規表示式在索引中的使用MongoDB索引
- perl正規表示式中的特殊變數變數