title: Jquery replace string element by delimiter
body: <p>I've a string like this</p>
  
  <pre><code>var str = "&lt;div class=\"@@obj.classname@@\" style="\@@obj.color@@\"&gt;@@obj.content@@&lt;/div&gt;";
  </code></pre>
  
  <p>I'd like to create a function to dynamically change it and get this result</p>
  
  <pre><code>var result = "&lt;div class=\"" + opt.obj.classname + "\" style="\" opt.obj.color + "\"&gt;" + opt.obj.content + "&lt;/div&gt;";
  </code></pre>
  
  <p>Is it possibile to do it? How could I do that? the replace function might help? Thank you</p>