title: RegEx for matching two single quotes from start and end of strings
body: <p>I need to replace two quotes at the beginning and end of elements with one quote.</p>
  
  <p>My code is:</p>
  
  <pre><code>const regex = /['']/g;
  let categories = [];
  let categoryArray = data.categories.split(','); // ''modiles2'', ''Men''s Apparel'', ''Women''s Apparel'', ''Jeans'', ''Sneakers''
      for (let value of Object.values(categoryArray)) {
          categories.push(categoryArray[i].replace(regex, '\''));
      }
  }
  return categories 
  // What should be 'modiles2','Men''s Apparel','Women''s Apparel','Jeans','Sneakers'
  // What comes back ''modiles2'',''Men''s Apparel'',''Women''s Apparel'',''Jeans'',''Sneakers''
  </code></pre>
  
  <p>My regular expression replaces only the first of two quotation marks with one quotation mark.</p>
  
  <p>How do I solve this problem?</p>