不要让我写这么一大串才能插入图片啊 求救!!!

远方 2005-09-28 01:08:22
replace 里面不知道怎么写啊
那位专家 指点指点啊
谢谢
   ASP菜鸟

不要让我写这么一大串才能插入图片啊

<img src="img/1.jpg">

:(
...全文
201 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
rqrq 2005-10-03
  • 打赏
  • 举报
回复
这类代码到处都有啊,去源码站下个支持ubb代码的blog或者留言板都可以找到

Function gubb(str)
str=Replace(str,vbcrlf,Chr(1) & Chr(2) & Chr(3))
dim re
Set re=New RegExp
re.IgnoreCase=True
re.Global=True
re.Pattern="\[img\](.*?)\[\/img\]"
str=re.Replace(str,"<img src=""$1"">")
re.Pattern="\[url\](.*?)\[\/url\]"
str=re.Replace(str,"<a href=""$1"" target=""_blank"">$1</a>")
re.Pattern="\[url=(.*?)\](.*?)\[\/url\]"
str=re.Replace(str,"<a href=""$1"" target=""_blank"">$2</a>")
re.Pattern="\[email\](.*?)\[\/email\]"
str=re.Replace(str,"<a href=""mailto:$1"">$1</a>")
re.Pattern="\(.*?)\[\/email\]"
str=re.Replace(str,"<a href=""mailto:$1"">$2</a>")
re.Pattern="\[fly\](.*?)\[\/fly\]"
str=re.Replace(str,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>")
re.Pattern="\[move\](.*?)\[\/move\]"
str=re.Replace(str,"<marquee width=90% scrollamount=3>$1</marquee>")
re.Pattern="\[color=(.*?)\](.*?)\[\/color\]"
str=re.Replace(str,"<font color=""$1"">$2</font>")
re.Pattern="\[size=([1-7])\](.*?)\[\/size\]"
str=re.Replace(str,"<font size=""$1"">$2</font>")
re.Pattern="\[align=(.*?)\](.*?)\[\/align\]"
str=re.Replace(str,"<div align=""$1"">$2</div>")
re.Pattern="\[b\](.*?)\[\/b\]"
str=re.Replace(str,"<b>$1</b>")
re.Pattern="\[u\](.*?)\[\/u\]"
str=re.Replace(str,"<u>$1</u>")
re.Pattern="\[i\](.*?)\[\/i\]"
str=re.Replace(str,"<i>$1</i>")
re.Pattern="\[sub\](.*?)\[\/sub\]"
str=re.Replace(str,"<sub>$1</sub>")
re.Pattern="\[sup\](.*?)\[\/sup\]"
str=re.Replace(str,"<sup>$1</sup>")
re.Pattern="\[strike\](.*?)\[\/strike\]"
str=re.Replace(str,"<strike>$1</strike>")
re.Pattern="\[ul\](.*?)\[\/ul\]"
str=re.Replace(str,"<ul>$1</ul>")
re.Pattern="\[ol\](.*?)\[\/ol\]"
str=re.Replace(str,"<ol>$1</ol>")
re.Pattern="\[li\](.*?)\[\/li\]"
str=re.Replace(str,"<li>$1</li>")
str=Replace(str,Chr(1) & Chr(2) & Chr(3),vbcrlf)
gubb=str
Set re=Nothing
end Function
远方 2005-09-28
  • 打赏
  • 举报
回复
2楼说的对啊
就是不知道怎么编写UBB啊?
ybfqlyq 2005-09-28
  • 打赏
  • 举报
回复
暈厥
jspadmin 2005-09-28
  • 打赏
  • 举报
回复
???
skangming 2005-09-28
  • 打赏
  • 举报
回复
??看不懂你的问题
oldmht 2005-09-28
  • 打赏
  • 举报
回复
你需要的是UBB么
输入就能插入图片?
dream520 2005-09-28
  • 打赏
  • 举报
回复
不明白

28,405

社区成员

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

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