Meta character for 'Inverse' and 'or' in this certain problem using Regular Expression
Problem: Query the list of CITY names from STATION that either do not start with vowels or do not end with vowels. Your result cannot contain duplicates. In Oracle use REGEXP_LIKE function: This solution works fine but I want to solve it with one RegExp: 1.SELECT DISTINCT CITY FROM STATION WHERE NOT REGEXP_LIKE(CITY, '^[AEIOU]') OR NOT REGEXP_LIKE(CITY,'[aeiou]$'); 2.SELECT DISTINCT city FROM station WHERE NOT REGEXP_LIKE(city,'^[AEIOU].*[aeiou]$'); // 👆 My question1: Without using 'NOT' and 'OR' operator of SQL can't we use any inverse metacharacter in Regular Expression? RegEx[ not(A and B) ] = RegEx [not(A) or not(B) ] See the output of this to be more specific 👇 https://code.sol https://code.sololearn.com/WzGF3KRsC2B7/?ref=app Problem: https://www.hackerrank.com/challenges/weather-observation-station-11