' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
s = "<div id=""Modul"" class=""Form"" rel=""1"">Tekst</div>"
pat = "<div\s+id\s*=\s*[""']([^""']*)[""']\s+class\s*=\s*[""']([^""']*)[""']\s+rel\s*=\s*[""']([^""']*)[""']>[^<]*</div>"
Set re = New RegExp
re.Pattern = pat
re.Global = True
Set mm = re.Execute(s)
Set m = mm.Item(0)
attr_id =  m.SubMatches(0)
attr_class =  m.SubMatches(1)
attr_rel =  m.SubMatches(2)
Set m = Nothing
Set mm = Nothing
Set re = Nothing
WScript.Echo s
WScript.Echo pat
WScript.Echo attr_id & " " & attr_class & " " & attr_rel
