Originally posted by yishanju at 2009-5-4 11:51 PM:
一般用正则表达式查找替换工具处理比较好
fr -rnnlic:"like bat\r\n\r\n" -t:"join us\." a.txt
FR 下载:
http://baiy.cn/utils/fr/index.htm
这个也是有问题的,不能够循环处理。如果like bat在空行的后面,就无法找到like bat字段并进行处理。
还有,看来依山居兄对fr的正则表达式十分的精通,为什么不开个专版,专门阐述一下呢?偶看了白扬的网址,里面只是规则,但很缺乏实例解说,让初学者很是迷茫啊!
Last edited by pkto on 2009-10-22 at 20:40 ]
Originally posted by yishanju at 2009-5-4 11:51 PM:
It is generally better to use a regular expression find-and-replace tool for processing.
fr -rnnlic:"like bat\r\n\r\n" -t:"join us\." a.txt
FR download:
http://baiy.cn/utils/fr/index.htm
This also has issues and cannot handle processing in a loop. If "like bat" is after a blank line, it cannot find the "like bat" field and process it.
Also, it seems that Brother Yishanju is very proficient in the regular expressions of fr. Why not open a special section to specifically elaborate on it? I looked at Bai Yang's website, which only has rules but lacks example explanations, making it very confusing for beginners.
Last edited by pkto on 2009-10-22 at 20:40 ]