感冒了,写完函数就乖乖去睡觉,今天过得真是辛苦,有种快要死掉的感觉。。。鼻子里塞着纸团,因为鼻涕止不住地流,呜
替换函数的代码如下:
function ubbtohtml(str,tag)
dim length,temparray,i,tempstr
tempstr = ""
temparray = split(str,"[/ "&tag&" ]")
length = ubound(temparray)-1
for i=0 to length
tempstr = tempstr & replace(temparray(i),"["&tag&"]","" & chr(13)
next
tempstr = tempstr & "" & temparray(length+1)
ubbtohtml = tempstr
end function
'==========函数使用========
dim test
test = ubbtohtml("00000 [ code ]code1[/ code ]pg1[ code ]code2[/ code ]pg2 ####","code")
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
源代码
")
tempstr = tempstr & "
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
[ctrl+a 全选 注:如需引入外部js需刷新才能执行]
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!