正则表达式如何理解?

Guodj 2006-03-17 04:29:29

strTag={tag:NewJob LoopNum="5" tpl="NewJob"/} '为方便直接给出值,应是由网页中查找


TStr = ReadFile("Template/" & LanguageSet & "/SubTpl/" & GetAttribute("tpl", strTag) & ".html")

Public Function GetAttribute(ByVal strAttribute, ByVal strTag)
....
objRegEx.Pattern = LCase(strAttribute) & "=""[0-9a-zA-Z]*"""
...
Set Matches = objRegEx.Execute(strTag)

If Matches.Count > 0 Then
GetAttribute = Split(Matches(0).Value, """")(1)
Else
GetAttribute = ""
End If
'消毁对象
Set Matches = Nothing
Set objRegEx = Nothing
End Function

以上代码是在网面中找到特定的标签然后用相应的内容来替换.

请问以下这个正则表达式如何理解:
objRegEx.Pattern = LCase(strAttribute) & "=""[0-9a-zA-Z]*"""

因本人没分还请愿谅,第一次发贴.
...全文
47 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,129

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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