[jdev] ruby xmppd, and Psi

Eric Will rakaur at malkier.net
Thu Sep 18 11:46:42 CDT 2008


It took a while of playing around, but this works:

    resp = Base64.decode64(elem.text)
    re = /((?:[\w-]+)\s*=\s*(?:(?:"[^"]+")|(?:[^,]+)))/

    response = {}
    resp.scan(re) do |kv|
        k, v = kv[0].split('=', 2)
        v.gsub!(/^"(.*)"$/, '\1')
        response[k] = v
    end

And isn't totally repulsive. Thanks.



More information about the JDev mailing list