title: Wildcard while comparing strings on JavaScript
body: <p>I need to compare 2 Strings, is there any wildcard character?</p>
  
  <p>In case that there is none wildcard, how can i do this? The strings to compare are concatenations of substrings like this HHH-H-HHH separated by ','.</p>
  
  <p>Example:</p>
  
  <pre><code>var str1 = "HHH-H-HHH,OOO-O-OOO"
  
  var str2 = "HHH-$-HHH,OOO-O-OOO"
  
  var str3 = "HHH-H-HHH,OOO-$-OOO"
  
  var str4 = "HHH-H-HHH,OOO-U-OOO"
  
  str1.equals(str2) // SHOULD BE TRUE
  
  str1.equals(str3) // SHOULD BE TRUE
  
  str1.equals(str4) // SHOULD BE FALSE
  </code></pre>