<div dir="ltr">oh, it might want the global flag:<div><br></div><div>resp.match(/(\w+\s*=\s*(?:(?:"[^"]+")|(?:[^,]+)))/g)</div><div><br><div class="gmail_quote">On Thu, Sep 18, 2008 at 4:58 PM, Eric Will <span dir="ltr"><<a href="mailto:rakaur@malkier.net">rakaur@malkier.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Thu, Sep 18, 2008 at 10:56 AM, Norman Rasmussen<br>
<div class="Ih2E3d"><<a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</a>> wrote:<br>
</div><div class="Ih2E3d">> (IANARC - I am not a ruby coder), here's another attempt:<br>
> resp = Base64.decode64(elem.text)<br>
> resp = resp.match(/(\w+\s*=\s*(?:(?:"[^"]+")|(?:[^,]+)))/)<br>
> response = {}<br>
> resp.captures do |kv|<br>
> k, v = kv.split('=',2)<br>
> v.gsub!(/^"(.*)"$/, '\1')<br>
><br>
> response[k] = v<br>
><br>
> end<br>
<br>
</div>On Thu, Sep 18, 2008 at 10:45 AM, Norman Rasmussen<br>
<div class="Ih2E3d"><<a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</a>> wrote:<br>
</div>> fixed:<br>
<br>
I'm not sure how to use your re; when I match it the only capture I<br>
get is "charset=utf8." Do you continue to loop over it, or something?<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
JDev mailing list<br>
FAQ: <a href="http://www.jabber.org/discussion-lists/jdev-faq" target="_blank">http://www.jabber.org/discussion-lists/jdev-faq</a><br>
Forum: <a href="http://www.jabberforum.org/forumdisplay.php?f=20" target="_blank">http://www.jabberforum.org/forumdisplay.php?f=20</a><br>
Info: <a href="http://mail.jabber.org/mailman/listinfo/jdev" target="_blank">http://mail.jabber.org/mailman/listinfo/jdev</a><br>
Unsubscribe: <a href="mailto:JDev-unsubscribe@jabber.org">JDev-unsubscribe@jabber.org</a><br>
_______________________________________________<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>- Norman Rasmussen<br> - Email: <a href="mailto:norman@rasmussen.co.za">norman@rasmussen.co.za</a><br> - Home page: <a href="http://norman.rasmussen.co.za/">http://norman.rasmussen.co.za/</a><br>
</div></div>