Trying to return part of a url through regex (jquery)
<p>I'm trying to return a part of the url as a string and add it elsewhere.</p>

<p>So I do something like this:</p>

<pre><code>var somestring = $("#hello").attr("href").text().replace(/part\/(\d+)/g, "part-$1");
</code></pre>

<p>Only I don't think this is correct. What's the correct way to do return the "part-$1" as a string?</p>

<p>Thanks!</p>

<p>Here's the example:</p>

<p><a href="http://jsbin.com/agiyu/edit" rel="nofollow">http://jsbin.com/agiyu/edit</a></p>

<p>If successful the output should be something like Fake Urlpart-333.</p>

<p>Thanks!</p>
