I\'m trying to do a parse of html content using jQuery/Javascript. I want to look for words between square brackets and change the whole word for a link.
Example:
$("div").html(function(i, html) { return html.replace(/\[\[(.+?)\]\]/g, "$1"); });
DEMO: http://jsfiddle.net/y4N6e/