temporary


set si = WScript.StdIn
set so = WScript.StdOut
set dc = CreateObject("Scripting.Dictionary")

sub process_paragraph()
set re = new RegExp
re.Pattern = "tag (\w+)=(\w+)"
found = false
do while not si.AtEndOfStream
l = si.ReadLine()
if Len(l) = 0 then
exit sub
end if
if re.Test(l) and (not found) then
found = true
set m = re.Execute(l)(0)
d1 = m.SubMatches(0)
d2 = m.SubMatches(1)
' so.WriteLine "(" & d1 & ")=(" & d2 & ")"
dc(d1) = d2
end if
loop
end sub

do while not si.AtEndOfStream
call process_paragraph
loop

for each d in dc.Keys
so.WriteLine d & "," & dc(d)
next