title: JQuery - Replace Underscore With Space
body: <p>I have the following html and I want to replace underscores with spaces for all anchor tags that appear inside a div with class <code>xyz</code></p>
  
  <pre><code>&lt;div class="xyz"&gt;
    &lt;b&gt;&lt;a&gt;Hello_1&lt;/a&gt;&lt;/b&gt;
  &lt;/div&gt;
  &lt;div class="xyz"&gt;
     &lt;b&gt;&lt;a&gt;Hello_2&lt;/a&gt;&lt;/b&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The following doesnt work?</p>
  
  <pre><code>$('.xyz').each(function() {
     var $this = $(this);
  
     $this.find('a').text().replace(/_/g, ' '));
  });
  </code></pre>