正则表达式如何理解?
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]*"""
因本人没分还请愿谅,第一次发贴.