Q:

How to find quotes with double quotes? 

my english language is not good.  sorry! 
How to write quotes with double quotes inside the one var? 
i want merge two script: number1 and number2

//number 1:
    var rew = /\'/g;
    $('span').contents().each(function() {
    if (this.nodeType === 3 && rew.test(this.nodeValue)) {
    this.nodeValue = this.nodeValue.replace(rew, '');
    }
    });
    
 //number 2:
    var ref = /\"/g;
    $('span').contents().each(function() {
    if (this.nodeType === 3 && ref.test(this.nodeValue)) {
    this.nodeValue = this.nodeValue.replace(ref, '');
    }
    });
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<span>
Hello 'world'.<br>
Hello "world". 
</span>

A:

On one hand, you could simply include both ' and " in a character set:
/['"]/g

This will match and remove all quotemarks.  But this will also remove quotemarks that aren't actually quoting, eg:
Bob's
games' difficulty

So you may consider matching only quotemarks that have a matching quotemark later, before a word break.  Match and capture a ' or a ", then repeat and capture (in a second capturing group) any non-space characters until encountering the same captured character, and replace with that second capturing group (the non-space characters that came inside the quotes):

//number 1:
var rew = /(['"])(\S+)\1/g;
$('span').contents().each(function() {
  if (this.nodeType === 3) {
    this.nodeValue = this.nodeValue.replace(rew, '$2');
  }
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<span>
Hello 'world'.<br>
Hello "world".<br>
Bob's<br>
games' difficulty
</span>

