getting value using explode
<p>I am trying to parse following string...</p>

<pre><code>IN.Tags.Share({"count":180,"url":"http://domain.org"}
</code></pre>

<p>is my following approach correct to get the value of count?</p>

<pre><code>$str = 'IN.Tags.Share({"count":180,"url":"http://domain.org"}';
$data = explode(':', $str);
$val = explode(',', $data[1]);
return $val[0];
</code></pre>

<p>Or is there any better way to handling this type of strings? I think it could be done using regex as well.</p>

<p>thanks.</p>
