title: Replacing each instance of option value , not working for me
body: <p>I have a value like this</p>
  <pre><code>&lt;option value=&quot;RB+TE+WR+DEF+CB&quot;&gt;text&lt;/option&gt;
  </code></pre>
  <p>I'm trying to replace all instances of &quot;+&quot; with a &quot;-&quot;</p>
  <p>Both my tries only replaced the 1st &quot;+&quot; and results were</p>
  <pre><code>&lt;option value=&quot;RB-TE+WR+DEF+CB&quot;&gt;text&lt;/option&gt;
  </code></pre>
  <p>This is what i've tried</p>
  <pre><code>$('option').each(function () {
      $(this).val(function (i, v) {
          return v.replace(&quot;+&quot;, &quot;-&quot;);
      });
  })
  
  $('option').val(function (i, v) {
      return v.replace(&quot;+&quot;, &quot;-&quot;);
  });
  
  $('option').val(function (i, v) {
      return v.replace(new RegExp(&quot;/+/&quot;, &quot;g&quot;), '-');
  });
  </code></pre>
  <p>I need the result to be</p>
  <pre><code>&lt;option value=&quot;RB-TE-WR-DEF-CB&quot;&gt;text&lt;/option&gt;
  </code></pre>