title: Match the same start and end character of a string with Regex
body: <p>I'm trying to match the start and end character of a string to be the same vowel. My regex is working in most scenarios, but failing in others:</p>
  
  <pre><code>var re = /([aeiou]).*\1/;
  re.test(str);
  </code></pre>
  
  <p>Sample input:</p>
  
  <ul>
  <li><code>abcde</code>, output - false (Valid)</li>
  <li><code>abcda</code>, output - true (Valid)</li>
  <li><code>aabcdaa</code>, output - true (Valid)</li>
  <li><code>aeqwae</code>, output - true (Not valid)</li>
  <li><code>ouqweru</code>, output - true (Not valid)</li>
  </ul>