本帖最后由 stxsbc 于 2014-07-14 22:31 编辑
a.txt的内容:
SLICE EDIT,14
DOSE A,NOMINAL=2
CHIP LCD1,
$ (A, 1NCLONG-CD-11,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD2,
$ (A, 1NCLONG-CD-12,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD3,
$ (A, 1NCLONG-CD-13,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD4,
$ (A, 1NCLONG-CD-14,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD5,
$ (A, 1NCLONG-CD-02,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD6,
$ (A, 5CD5CD5-CD-01,AD=0.1,SF=1)
ROWS 63500/63500
END
将其中的1NCLONG-CD替换成1NCLONG-04; 5CD5CD5-CD替换成 5CD5CD5-04
变成这样的txt
SLICE EDIT,14
DOSE A,NOMINAL=2
CHIP LCD1,
$ (A, 1NCLONG-04-11,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD2,
$ (A, 1NCLONG-04-12,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD3,
$ (A, 1NCLONG-04-13,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD4,
$ (A, 1NCLONG-04-14,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD5,
$ (A, 1NCLONG-04-02,AD=0.1,SF=1)
ROWS 63500/63500
CHIP LCD6,
$ (A, 5CD5CD5-04-01,AD=0.1,SF=1)
ROWS 63500/63500
END
我以后要有几十个替换的
怎么办
要写个脚本么 |