[jdev] ruby xmppd, and Psi
Eric Will
rakaur at malkier.net
Thu Sep 18 09:58:43 CDT 2008
On Thu, Sep 18, 2008 at 10:56 AM, Norman Rasmussen
<norman at rasmussen.co.za> wrote:
> (IANARC - I am not a ruby coder), here's another attempt:
> resp = Base64.decode64(elem.text)
> resp = resp.match(/(\w+\s*=\s*(?:(?:"[^"]+")|(?:[^,]+)))/)
> response = {}
> resp.captures do |kv|
> k, v = kv.split('=',2)
> v.gsub!(/^"(.*)"$/, '\1')
>
> response[k] = v
>
> end
On Thu, Sep 18, 2008 at 10:45 AM, Norman Rasmussen
<norman at rasmussen.co.za> wrote:
> fixed:
I'm not sure how to use your re; when I match it the only capture I
get is "charset=utf8." Do you continue to loop over it, or something?
More information about the JDev
mailing list