[jdev] ruby xmppd, and Psi
Eric Will
rakaur at malkier.net
Thu Sep 18 10:16:25 CDT 2008
This is ugly, but it (kind of) works:
resp = Base64.decode64(elem.text)
re = /(\w+\s*=\s*(?:(?:"[^"]+")|(?:[^,]+)))/
m = re.match resp
response = {}
k, v = m[1].split('=',2)
v.gsub!(/^"(.*)"$/, '\1')
response[k] = v
while (m = re.match m.post_match)
k, v = m[1].split('=',2)
v.gsub!(/^"(.*)"$/, '\1')
response[k] = v
end
Unfortunately, it also kills the '=' on cnonce.
More information about the JDev
mailing list