title: MySQL regular expression - not starting nor ending with vowels
body: <p>I was playing around with this challenge here: <a href="https://www.hackerrank.com/challenges/weather-observation-station-12/problem" rel="nofollow noreferrer">Weather Observation Station 12</a></p>
  
  <p>And I tried submitting this answer:</p>
  
  <pre><code>SELECT DISTINCT CITY FROM STATION
  WHERE CITY NOT REGEXP '^[aeiouAEIOU].*[aeiouAEIOU]$'
  </code></pre>
  
  <p>I know that this answer works (inspired by this <a href="https://stackoverflow.com/questions/49228926/get-city-name-either-do-not-start-with-vowels-or-do-not-end-with-vowels">very similar question</a>):</p>
  
  <pre><code>SELECT DISTINCT CITY FROM STATION
  WHERE CITY NOT RLIKE '^[aeiouAEIOU]' AND CITY NOT RLIKE '[aeiouAEIOU]$'
  </code></pre>
  
  <p>... But I couldn't write an accepted answer in a single regular expression. Can anyone explain why? </p>
  
  <hr>
  
  <p><strong>What it searches in</strong> </p>
  
  <p>As a commenter pointed out, then above-written page requires login. So for good measures sake, I'll add here that it searches amongst 500 city-names, such as (each in their own row in the database): </p>
  
  <pre><code>Kissee Mills, Loma Mar, Sandy Hook, Tipton, Arlington, Turner, Slidell, Negreet, Glencoe, Chelsea, Chignik Lagoon, Pelahatchie, Hanna City, Dorrance, Albany, Monument, Manchester, Prescott, Graettinger, Cahone, Sturgis, Upperco, Highwood, Waipahu, Bowdon, Tyler, Watkins, Republic, Millville, Aguanga, Bowdon Junction, Morenci, South El Monte 
  </code></pre>
  
  <hr>
  
  <p><strong>Differences between regular expressions</strong></p>
  
  <p>And I've heard that there are some minor differences in regular expressions from one language to another (PHP, JavaScript, Perl, MySQL, Ruby, etc.). But I can't find a page that explains what those differences are. I could sit down and read the documentation for each language and cross-reference it, - but are there not a place where it has been summed up? </p>
  
  <p><strong>Addition:</strong> I come from the PHP-world, - and every time I write a regular expression in MySQL, there's a seed of doubt thinking: 'Is this one of those things that are different?'. Ideally I was looking for a place, where I could kill that doubt. Especially because it's so difficult to Google, because regular expressions are so punctuation-heavy. </p>