title: How do I replace string within quotes in javascript?
body: <p>I have this in a javascript/jQuery string (This string is grabbed from an html (<code>$('#shortcode')</code>) elements value which could be changed if user clicks some buttons)</p>
  <pre><code>[csvtohtml_create include_rows=&quot;1-10&quot; 
  debug_mode=&quot;no&quot; source_type=&quot;visualizer_plugin&quot; path=&quot;map&quot; 
  source_files=&quot;bundeslander_staple.csv&quot; include cols=&quot;1,2,4&quot; exclude cols=&quot;3&quot;]
  </code></pre>
  <p>In a textbox (named <code>incl_sc</code>) I have the value:</p>
  <pre><code>include cols=&quot;2,4&quot;
  </code></pre>
  <p>I want to replace <code>include_cols=&quot;1,2,4&quot;</code> from the above string with the value from the textbox.</p>
  <p><strong>so basically:</strong>
  How do I replace include_cols values here? (<code>include_cols=&quot;2,4&quot;</code> <strong>instead of</strong> <code>include_cols=&quot;1,2,4&quot;</code>) I'm great at many things but regex is not one of them. I guess regex is the thing to use here?</p>
  <p>I'm trying this:</p>
  <pre><code>var s = $('#shortcode').html();
  
  //I want to replace include cols=&quot;1,2,4&quot; exclude cols=&quot;3&quot; 
  //with include_cols=&quot;1,2&quot; exclude_cols=&quot;3&quot; for example
  s.replace('/([include=&quot;])[^]*?\1/g', incl_sc.val() ); 
  </code></pre>
  <p>but I don't get any replacement at all (the string s is same string as $(&quot;#shortcode&quot;).html(). Obviously I'm doing something really dumb. Please help :-)</p>