请帮忙写一个正则

tatty_bad 2008-11-05 09:16:20
<div onmouseover="foot('第一个');pl_show('这里的内容是任意的,可能是数字,或者中文或者英文',this)" onmouseout="pl_hide()" style="float: left; cursor: default">

我想要pl_show('')这个中间的内容,其他的不要请问这个正则怎么写???
...全文
113 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
不知道你是要上面2种正则写的效果还是:



Set reg = New RegExp
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "(.*?)pl_show\(\'(.*?)\'(.*)?"
str="<div onmouseover=""foot('第一个');pl_show('这里的内容是任意的,可能是数字,或者中文或者英文',this)"" onmouseout=""pl_hide()"" style=""float: left; cursor: default"">"
str=reg.Replace(str,"$2")

response.Write str&"<br>"

这个正则的效果
  • 打赏
  • 举报
回复
Set reg = New RegExp 
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "(.*?)pl_show\((.*?)\)(.*)?"
str="<div onmouseover=""foot('第一个');pl_show('这里的内容是任意的,可能是数字,或者中文或者英文',this)"" onmouseout=""pl_hide()"" style=""float: left; cursor: default"">"
str=reg.Replace(str,"$2")

response.Write str&"<br>"
  • 打赏
  • 举报
回复
Set reg = New RegExp 
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "(.*?)pl_show\((.*?)\)""\s\S(.*)?"
str="<div onmouseover=""foot('第一个');pl_show('这里的内容是任意的,可能是数字,或者中文或者英文',this)"" onmouseout=""pl_hide()"" style=""float: left; cursor: default"">"
str=reg.Replace(str,"$2")

response.Write str&"<br>"
neo_yoho 2008-11-05
  • 打赏
  • 举报
回复
Function SubMatchTest(inpStr)
Dim reg, oMatches
Set reg = New RegExp
reg.Pattern = "pl_show\(\'(.*)?\'"
Set oMatches = reg.Execute(inpStr)
For Each Match in oMatches
response.write Match.SubMatches(0)
next
End Function
tatty_bad 2008-11-05
  • 打赏
  • 举报
回复
我顶

28,409

社区成员

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

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