I'm trying to return a part of the url as a string and add it elsewhere.
So I do something like this:
var somestring = $("#hello").attr("href").text().replace(/part\/(\d+)/g, "part-$1");
Only I don't think this is correct. What's the correct way to do return the "part-$1" as a string?
Thanks!
Here's the example:
If successful the output should be something like Fake Urlpart-333.
Thanks!