HTML文件里面的文本导入到SQL中

14098835 2008-04-14 02:05:48
各位牛人好,先举出样例(一条记录),源文件是个HTML文件,有500条这样的记录。
PT J
AU Mo, HZ
Zhu, Y
Chen, ZM
AF Mo, Haizhen
Zhu, Yang
Chen, Zongmao
TI Microbial fermented tea - a potential source of natural food preservatives
SO TRENDS IN FOOD SCIENCE & TECHNOLOGY
LA English
DT Review
ID PU-ERH TEA; SOLID-STATE FERMENTATION; ANTIMICROBIAL ACTIVITY; KOMBUCHA FERMENTATION; FUNGUS METABOLITES; OXIDATIVE DAMAGE; POLYPHENOLS; CATECHINS; EXTRACTS; BEVERAGE
AB Antimicrobial activities of microbial fermented tea are much less known than its health beneficial properties. These antimicrobial activities are generated in natural microbial fermentation process with tea leaves as substrates. The antimicrobial components produced during the fermentation process have shown inhibitory effects against several food-borne and pathogenic bacteria. With the trend of increasing use of natural and biological preservatives in food products, natural antimicrobial agents from microbial fermented tea may offer an innovative and interesting measure for such applications. However, a breakthrough in this field can only be realised after several critical aspects are clarified and further studied. Only then, the application of these potential, novel and natural antimicrobial substances from microbial fermented tea can be industrialized. The present review describes some unique microbial fermentation of tea and the antimicrobial activities formed during the fermentation process. Moreover, future needs in research and development of these antimicrobial compounds from microbial fermentation of tea are discussed for potential industrial applications.
C1 Univ Wageningen & Res Ctr, Food & Bioproc Engn Grp, NL-6700 EV Wageningen, Netherlands.
Henan Inst Sci & Technol, Dept Food Sci, Xinxiang 453003, Peoples R China.
Chinese Acad Agr Sci, Chinese Tea Res Inst, Hangzhou 310008, Peoples R China.
RP Zhu, Y, Univ Wageningen & Res Ctr, Food & Bioproc Engn Grp, POB 8129, NL-6700 EV Wageningen, Netherlands.
EM yang.zhuo@wur.nl
CR AIDOO KE, 2006, FEMS YEAST RES, V6, P30, DOI 10.1111/j.1567-1364.2005.00015.x
AN BJ, 2004, FOOD CHEM, V88, P549, DOI 10.1016/j.foodchem.2004.01.070
BANDYOPADHYAY D, 2005, BIOL PHARM BULL, V28, P2125
BAUERPETROVSKA B, 2000, INT J FOOD SCI TECH, V35, P201
BENK E, 1988, VERBRAUCHERDIENST, V33, P213
BLANC PJ, 1996, BIOTECHNOL LETT, V18, P139
CHEN C, 2000, J APPL MICROBIOL, V89, P834
CHIANG CT, 2006, ONCOL RES, V16, P119
CHOU CC, 1999, INT J FOOD MICROBIOL, V48, P125
CHU SC, 2006, FOOD CHEM, V98, P502, DOI 10.1016/j.foodchem.2005.05.080
CUSHNIE TPT, 2005, INT J ANTIMICROB AG, V26, P343, DOI 10.1016/j.ijantimicag.2005.09.002
DAVIS PN, 1990, INT CLIN NUTR REV, V10, P333
DUFRESNE C, 2000, FOOD RES INT, V33, P409
DUH PD, 2004, J AGR FOOD CHEM, V52, P8169, DOI 10.1021/jf0490551
EGGUM BO, 1983, BRIT J NUTR, V50, P197
ERNST E, 2003, FORSCH KOMP KLAS NAT, V10, P85
FOWLER MS, 1998, MICROBIOLOGY FERMENT, V1, P128
FRIEDMAN M, 2006, J FOOD PROTECT, V69, P354
GREENWALT CJ, 1998, FOOD SCI TECHNOL-LEB, V31, P291
GREENWALT CJ, 2000, J FOOD PROTECT, V63, P976
HAMILTONMILLER JMT, 1995, ANTIMICROB AGENTS CH, V39, P2375
HARTMANN AM, 2000, NUTRITION, V16, P755
HIRASAWA M, 2004, J ANTIMICROB CHEMOTH, V53, P225, DOI 10.1093/jac/dkh046
JIE GL, 2006, J AGR FOOD CHEM, V54, P8058, DOI 10.1021/jf061663o
KIM S, 2004, J FOOD PROTECT, V67, P2608
KUO KL, 2005, J AGR FOOD CHEM, V53, P480, DOI 10.1021/jf049375k
LIANG YR, 2005, J SCI FOOD AGR, V85, P381, DOI 10.1002/jsfa.1857
LIU CH, 1996, FOOD MICROBIOL, V13, P407
LULE SU, 2005, FOOD REV INT, V21, P367, DOI 10.1080/87559120500222862
MAYSER P, 1995, MYCOSES, V38, P289
MO HZ, 2005, AGRO FOOD IND HI TEC, V16, P16
PAULINE T, 2001, BIOMED ENVIRON SCI, V14, P207
RAM MS, 2000, J ETHNOPHARMACOL, V71, P235
SAKANAKA S, 2000, J BIOSCI BIOENG, V90, P81
SCHILLINGER U, 1996, TRENDS FOOD SCI TECH, V7, P158
SI WD, 2006, J CHROMATOGR A, V1125, P204, DOI 10.1016/j.chroma.2006.05.061
SIEVERS M, 1995, SYST APPL MICROBIOL, V18, P590
SMITS JP, 1996, APPL MICROBIOL BIOT, V46, P489
SMITS JP, 1999, BIOPROCESS ENG, V20, P391
SREERAMULU G, 2000, J AGR FOOD CHEM, V48, P2589
SREERAMULU G, 2001, ACTA BIOTECHNOL, V21, P49
STEINKRAUS KH, 1996, ACTA BIOTECHNOL, V16, P199
TAGURI T, 2004, BIOL PHARM BULL, V27, P1965
TEOH AL, 2004, INT J FOOD MICROBIOL, V95, P119, DOI 10.1016/j.ijfoodmicro.2003.12.020
VONMEIEN OF, 2002, BIOTECHNOL BIOENG, V79, P416
WU SC, 2007, LWT-FOOD SCI TECHNOL, V40, P506, DOI 10.1016/j.lwt.2005.11.008
XU X, 2005, ENG LIFE SCI, V5, P382, DOI 10.1002/elsc.200520083
XU XQ, 2007, J SCI FOOD AGR, V87, P1502, DOI 10.1002/jsfa.2874
YAMAMOTO Y, 2004, BIOFACTORS, V21, P119
YAO SZ, 1998, BIOTECHNOL PROGR, V14, P639
YILMAZ Y, 2006, TRENDS FOOD SCI TECH, V17, P64, DOI 10.1016/j.tifs.2005.10.005

NR 51
TC 0
PU ELSEVIER SCIENCE LONDON
PI LONDON
PA 84 THEOBALDS RD, LONDON WC1X 8RR, ENGLAND
SN 0924-2244
J9 TRENDS FOOD SCI TECHNOL
JI Trends Food Sci. Technol.
PY 2008
VL 19
IS 3
BP 124
EP 130
PG 7
SC Food Science & Technology
GA 280UD
UT ISI:000254450900001
ER

红色字体重点注意的,需要把CR后面的文本导入到SQL或者EXCEL中,
逗号为分隔符,字段说明:

YILMAZ Y, 2006, TRENDS FOOD SCI TECH, V17, P64, DOI 10.1016/j.tifs.2005.10.005

作者名,年份,期刊名称/书名,卷数,期数,DOI号

本帖的关键是在一个HTML文件中找到 "CR " 然后把其后面的文本导入到SQL中, 以“NR ”结束,继续寻找下一条记录做上述的处理。
...全文
390 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复

<%
'//--清除html代码--//
Function ClearHtml(str)
Set regEx = New RegExp
regEx.Pattern = "<\/?[^>]*>"
regEx.IgnoreCase = false
regEx.Global = True
set re = regEx.execute(str)
str = regEx.Replace(str,"")
str = Replace(str,"  ","")
ClearHtml = str
Set reg=nothing
End Function
'//--正则获取对应信息--//
Function getStr(fString,patrn)
dim str
str=""
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Set reg=regEx.execute(fString)

int i=0
for i=0 to (reg.count-1)
if i=(reg.count-1) then
str = str & reg(i)
else
str = str & reg(i) & "|"
end if
next
getStr=str
End Function
'///这里获取html文本的内容并保存到变量content,代码自己改
set fso=server.createobject("scripting.filesystemobject")
htmlFile=Server.MapPath("test.txt")
if fso.fileexists(htmlFile)=true then
set read=fso.opentextfile(htmlFile)
while not read.atendofstream
content=read.readall
wend
read.close
set read=nothing
end if
'///下面是主要部分
Response.Write(Replace(ClearHtml(getStr(content,"CR\s*</td>([\s\S]*)NR\s*</td>")),chr(13),"<br/>"))
'如果上面输出的还不是你想要的内容,那么注释的部分自己研究,然后筛选内容,提示就这么多
'str=ClearHtml(getStr(content,"CR\s*</td>([\s\S]*)NR\s*</td>"))
'strArr=split(str,chr(13))
'for i=0 to ubound(strArr)
' Response.Write(strArr(i)&"<br/><br/><br/><br/>")
'next
Response.End()
%>
14098835 2008-04-14
  • 打赏
  • 举报
回复
上帝呢~~~
14098835 2008-04-14
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 luxu001207 的回复:]
HTML code'//--清除html代码--//
Function ClearHtml(str)
Set regEx = New RegExp
regEx.Pattern = "<\/?[^>]*>"
regEx.IgnoreCase = false
regEx.Global = True
set re = regEx.execute(str)
str = regEx.Replace(str,"")
ClearHtml = str
Set reg=nothing
End Function
'再给个大概用得上的函数,没源码,正则写不了,剩下的问题留给楼下的解答,闪之
[/Quote]
非常感谢,如果问题可以搞定,分值分你一部分
14098835 2008-04-14
  • 打赏
  • 举报
回复
<table border="0" cellpadding="2" cellspacing="0"><tr><td>FN</td><td>ISI Export Format</td></tr><tr><td>VR</td><td>1.0</td></tr><table xmlns:exsl="http://exslt.org/common">
<tr>
<td valign="top">PT </td>
<td>J</td>
</tr>
<tr>
<td valign="top">AU </td>
<td>Mo, HZ<br>
Zhu, Y<br>

Chen, ZM</td>
</tr>
<tr>
<td valign="top">AF </td>
<td>Mo, Haizhen<br>
Zhu, Yang<br>
Chen, Zongmao</td>
</tr>
<tr>

<td valign="top">TI </td>
<td>Microbial fermented tea - a potential source of natural food
preservatives</td>
</tr>
<tr>
<td valign="top">SO </td>
<td>TRENDS IN FOOD SCIENCE & TECHNOLOGY</td>
</tr>
<tr>
<td valign="top">LA </td>
<td>English</td>

</tr>
<tr>
<td valign="top">DT </td>
<td>Review</td>
</tr>
<tr>
<td valign="top">ID </td>
<td>PU-ERH TEA; SOLID-STATE FERMENTATION; ANTIMICROBIAL ACTIVITY; KOMBUCHA
FERMENTATION; FUNGUS METABOLITES; OXIDATIVE DAMAGE; POLYPHENOLS;
CATECHINS; EXTRACTS; BEVERAGE</td>
</tr>
<tr>
<td valign="top">AB </td>
<td>Antimicrobial activities of microbial fermented tea are much less known
than its health beneficial properties. These antimicrobial activities
are generated in natural microbial fermentation process with tea leaves
as substrates. The antimicrobial components produced during the
fermentation process have shown inhibitory effects against several
food-borne and pathogenic bacteria. With the trend of increasing use of
natural and biological preservatives in food products, natural
antimicrobial agents from microbial fermented tea may offer an
innovative and interesting measure for such applications. However, a
breakthrough in this field can only be realised after several critical
aspects are clarified and further studied. Only then, the application
of these potential, novel and natural antimicrobial substances from
microbial fermented tea can be industrialized. The present review
describes some unique microbial fermentation of tea and the
antimicrobial activities formed during the fermentation process.
Moreover, future needs in research and development of these
antimicrobial compounds from microbial fermentation of tea are
discussed for potential industrial applications.</td>

</tr>
<tr>
<td valign="top">C1 </td>
<td>Univ Wageningen & Res Ctr, Food & Bioproc Engn Grp, NL-6700 EV Wageningen, Netherlands.<br>
Henan Inst Sci & Technol, Dept Food Sci, Xinxiang 453003, Peoples R China.<br>
Chinese Acad Agr Sci, Chinese Tea Res Inst, Hangzhou 310008, Peoples R China.</td>

</tr>
<tr>
<td valign="top">RP </td>
<td>Zhu, Y, Univ Wageningen & Res Ctr, Food & Bioproc Engn Grp, POB 8129,
NL-6700 EV Wageningen, Netherlands.</td>
</tr>
<tr>
<td valign="top">EM </td>
<td>yang.zhuo@wur.nl</td>
</tr>

<tr>
<td valign="top">CR </td>
<td>AIDOO KE, 2006, FEMS YEAST RES, V6, P30, DOI
10.1111/j.1567-1364.2005.00015.x<br>
AN BJ, 2004, FOOD CHEM, V88, P549, DOI 10.1016/j.foodchem.2004.01.070<br>
BANDYOPADHYAY D, 2005, BIOL PHARM BULL, V28, P2125<br>
BAUERPETROVSKA B, 2000, INT J FOOD SCI TECH, V35, P201<br>
BENK E, 1988, VERBRAUCHERDIENST, V33, P213<br>

BLANC PJ, 1996, BIOTECHNOL LETT, V18, P139<br>
CHEN C, 2000, J APPL MICROBIOL, V89, P834<br>
CHIANG CT, 2006, ONCOL RES, V16, P119<br>
CHOU CC, 1999, INT J FOOD MICROBIOL, V48, P125<br>
CHU SC, 2006, FOOD CHEM, V98, P502, DOI 10.1016/j.foodchem.2005.05.080<br>
CUSHNIE TPT, 2005, INT J ANTIMICROB AG, V26, P343, DOI
10.1016/j.ijantimicag.2005.09.002<br>

DAVIS PN, 1990, INT CLIN NUTR REV, V10, P333<br>
DUFRESNE C, 2000, FOOD RES INT, V33, P409<br>
DUH PD, 2004, J AGR FOOD CHEM, V52, P8169, DOI 10.1021/jf0490551<br>
EGGUM BO, 1983, BRIT J NUTR, V50, P197<br>
ERNST E, 2003, FORSCH KOMP KLAS NAT, V10, P85<br>
FOWLER MS, 1998, MICROBIOLOGY FERMENT, V1, P128<br>

FRIEDMAN M, 2006, J FOOD PROTECT, V69, P354<br>
GREENWALT CJ, 1998, FOOD SCI TECHNOL-LEB, V31, P291<br>
GREENWALT CJ, 2000, J FOOD PROTECT, V63, P976<br>
HAMILTONMILLER JMT, 1995, ANTIMICROB AGENTS CH, V39, P2375<br>
HARTMANN AM, 2000, NUTRITION, V16, P755<br>
HIRASAWA M, 2004, J ANTIMICROB CHEMOTH, V53, P225, DOI
10.1093/jac/dkh046<br>

JIE GL, 2006, J AGR FOOD CHEM, V54, P8058, DOI 10.1021/jf061663o<br>
KIM S, 2004, J FOOD PROTECT, V67, P2608<br>
KUO KL, 2005, J AGR FOOD CHEM, V53, P480, DOI 10.1021/jf049375k<br>
LIANG YR, 2005, J SCI FOOD AGR, V85, P381, DOI 10.1002/jsfa.1857<br>
LIU CH, 1996, FOOD MICROBIOL, V13, P407<br>
LULE SU, 2005, FOOD REV INT, V21, P367, DOI 10.1080/87559120500222862<br>

MAYSER P, 1995, MYCOSES, V38, P289<br>
MO HZ, 2005, AGRO FOOD IND HI TEC, V16, P16<br>
PAULINE T, 2001, BIOMED ENVIRON SCI, V14, P207<br>
RAM MS, 2000, J ETHNOPHARMACOL, V71, P235<br>
SAKANAKA S, 2000, J BIOSCI BIOENG, V90, P81<br>
SCHILLINGER U, 1996, TRENDS FOOD SCI TECH, V7, P158<br>

SI WD, 2006, J CHROMATOGR A, V1125, P204, DOI
10.1016/j.chroma.2006.05.061<br>
SIEVERS M, 1995, SYST APPL MICROBIOL, V18, P590<br>
SMITS JP, 1996, APPL MICROBIOL BIOT, V46, P489<br>
SMITS JP, 1999, BIOPROCESS ENG, V20, P391<br>
SREERAMULU G, 2000, J AGR FOOD CHEM, V48, P2589<br>
SREERAMULU G, 2001, ACTA BIOTECHNOL, V21, P49<br>

STEINKRAUS KH, 1996, ACTA BIOTECHNOL, V16, P199<br>
TAGURI T, 2004, BIOL PHARM BULL, V27, P1965<br>
TEOH AL, 2004, INT J FOOD MICROBIOL, V95, P119, DOI
10.1016/j.ijfoodmicro.2003.12.020<br>
VONMEIEN OF, 2002, BIOTECHNOL BIOENG, V79, P416<br>
WU SC, 2007, LWT-FOOD SCI TECHNOL, V40, P506, DOI
10.1016/j.lwt.2005.11.008<br>
XU X, 2005, ENG LIFE SCI, V5, P382, DOI 10.1002/elsc.200520083<br>

XU XQ, 2007, J SCI FOOD AGR, V87, P1502, DOI 10.1002/jsfa.2874<br>
YAMAMOTO Y, 2004, BIOFACTORS, V21, P119<br>
YAO SZ, 1998, BIOTECHNOL PROGR, V14, P639<br>
YILMAZ Y, 2006, TRENDS FOOD SCI TECH, V17, P64, DOI
10.1016/j.tifs.2005.10.005</td>
</tr>
<tr>
<td valign="top">NR </td>
<td>51</td>

</tr>
<tr>
<td valign="top">TC </td>
<td>0</td>
</tr>
<tr>
<td valign="top">PU </td>
<td>ELSEVIER SCIENCE LONDON</td>
</tr>
<tr>
<td valign="top">PI </td>
<td>LONDON</td>

</tr>
<tr>
<td valign="top">PA </td>
<td>84 THEOBALDS RD, LONDON WC1X 8RR, ENGLAND</td>
</tr>
<tr>
<td valign="top">SN </td>
<td>0924-2244</td>
</tr>
<tr>
<td valign="top">J9 </td>
<td>TRENDS FOOD SCI TECHNOL</td>

</tr>
<tr>
<td valign="top">JI </td>
<td>Trends Food Sci. Technol.</td>
</tr>
<tr>
<td valign="top">PY </td>
<td>2008</td>
</tr>
<tr>
<td valign="top">VL </td>
<td>19</td>

</tr>
<tr>
<td valign="top">IS </td>
<td>3</td>
</tr>
<tr>
<td valign="top">BP </td>
<td>124</td>
</tr>
<tr>
<td valign="top">EP </td>
<td>130</td>

</tr>
<tr>
<td valign="top">PG </td>
<td>7</td>
</tr>
<tr>
<td valign="top">SC </td>
<td>Food Science & Technology</td>
</tr>
<tr>
<td valign="top">GA </td>

<td>280UD</td>
</tr>
<tr>
<td valign="top">UT </td>
<td>ISI:000254450900001</td>
</tr>
<tr>
<td>ER</td>
<td></td>
</tr>
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复

'//--清除html代码--//
Function ClearHtml(str)
Set regEx = New RegExp
regEx.Pattern = "<\/?[^>]*>"
regEx.IgnoreCase = false
regEx.Global = True
set re = regEx.execute(str)
str = regEx.Replace(str,"")
ClearHtml = str
Set reg=nothing
End Function
'再给个大概用得上的函数,没源码,正则写不了,剩下的问题留给楼下的解答,闪之
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复
没html源码出来,俺闪了...
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复
全部代码俺不会写...
抓出主要部分,然后用split来分析
14098835 2008-04-14
  • 打赏
  • 举报
回复
俺不要代码也可以,生成可执行程序最好了,哈哈
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复

'//--正则获取对应信息--//
Function getStr(fString,patrn)
dim str
str=""
Set regEx = New RegExp
regEx.Pattern = patrn
regEx.IgnoreCase = True
regEx.Global = True
Set reg=regEx.execute(fString)

int i=0
for i=0 to (reg.count-1)
if i=(reg.count-1) then
str = str & reg(i)
else
str = str & reg(i) & "|"
end if
next
getStr=str
End Function
'先给个函数,把你HTML文件的代码贴出来,不看内容,只看html源码,要不你自己写个正则
14098835 2008-04-14
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 luxu001207 的回复:]
几乎每次都要贴全部代码,我脑子坏了,扛不住,哎。。。
[/Quote]
如果可以搞定,分值全部给你了
xiaojing7 2008-04-14
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 14098835 的回复:]
有高手吗?
如果可以解决这个问题,分值可提高至1500分
[/Quote]
-----------
挺诱人的!不过还是顶!
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复
几乎每次都要贴全部代码,我脑子坏了,扛不住,哎。。。
14098835 2008-04-14
  • 打赏
  • 举报
回复
有高手吗?
如果可以解决这个问题,分值可提高至1500分
Atai-Lu 2008-04-14
  • 打赏
  • 举报
回复
用正则去筛选...
xiaojing7 2008-04-14
  • 打赏
  • 举报
回复
不懂说什么,顶!

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧