本帖最后由 xp3000 于 2021-7-1 19:22 编辑
EmEditor 宏(xxx.jsee)\r替换时候没生效是怎么回事?- if (document.selection.isempty)
- nFlags=eeFindNext | eeReplaceAll | eeFindReplaceRegExp;
- else
- nFlags=eeFindNext | eeReplaceSelOnly | eeReplaceAll | eeFindReplaceRegExp;
-
- document.selection.Replace("^[ \s\t]*\r?\n","",nFlags);
- document.selection.Replace("\r","\\\\r",nFlags);
- document.selection.Replace("\n","\\\\n",nFlags);
复制代码 替换\n不生效- nFlags=eeFindNext | eeReplaceAll;
- document.selection.Replace("^[ \s\t]*\r?\n","",nFlags);
- document.selection.Replace("\r","\\r",nFlags);
- document.selection.Replace("\n","\\n",nFlags);
复制代码 搜索→在文件中替换→导入下面内容文件,选择批处理替换能生效- on ^[ \s\t]*\r?\n R
- on \r \\r R
- on \n \\n R
复制代码
|