Weather Observation Station 9

  • + 2 comments

    Hello,

    May I ask if there is any difference if we add .* into the expression:

    SELECT DISTINCT CITY FROM STATION
    WHERE CITY REGEXP '^[^aeiou.*]';
    
    SELECT DISTINCT CITY FROM STATION
    WHERE CITY REGEXP '^[^aeiou].*';
    

    Edit: Based on the comments below, the 1st expression above is not correct because it means the string doesn't start with a,e,i,o,u and also doesn't start with . or *.

    But how about the 2nd expression? I'm wondering whether it is correct or not.

    Thanks!