- @set @n=0;/* & echo off
- echo,BKID,书名,作者,出版日期,出版社,ISBN>1.csv
- (for %%a in (*.htm) do (
- cscript -nologo -e:jscript "%~0"<"%%a"
- ))>>1.csv
- pause & exit/b */
-
- txt = WScript.StdIn.ReadAll();
- re = />作者:[\s\S]+?word=.+?'/ig;
-
- s = "";
- while ((ar = re.exec(txt)) != null) {
- s += ar[0].match(/bkid=(\d+)/i)[1] + ","
- s += ar[0].match(/word=(.*?)'/i)[1] + ","
- s += ar[0].match(/>作者:(.+?)</)[1] + ","
- s += ar[0].match(/>出版日期:(.+?)</)[1] + ","
- s += ar[0].match(/>出版社:(.+?)</)[1] + ","
- s += ar[0].match(/>ISBN:(.+?)</i)[1] + "\r\n";
- }
- WScript.StdOut.Write(s)
复制代码
|