DEV Community

Ali Hamza
Ali Hamza

Posted on

Day 90 of Learning MERN Stack

Hello Dev Community! πŸ‘‹

It is officially Day 90 of my 100-day full-stack and database engineering sprint! 🎯 Reaching the 90-day mark feels incredible. Yesterday, I worked with basic directional string filters. Today, I tackled compound textual intersections and text negation boundaries on HackerRank by mastering: Bi-Directional REGEXP Matching and Inverse Character Constraints! πŸ”πŸ’₯

In enterprise backend applications, data filtering isn't always linear. You often need to enforce strict multi-conditional text matchingβ€”like verifying that a dynamic string conforms to formatting criteria at both its entry and exit boundaries.


🧠 Breaking Down the Day 90 Structural Challenges

As written inside my testing scripts across "Screenshot (196).png" and "Screenshot (197).png", I replicated the schemas locally to verify how the SQL compiler handles complex regular expression matches:

1. Challenge: Weather Observation Station 8 (Bi-Directional Matching)

  • The Goal: Query the list of unique CITY names from STATION that both start with vowels AND end with vowels.
  • The Execution: Instead of grouping slow, repetitive AND statement loops, I unified the entire boundary pipeline using a single optimized regular expression containing wildcards (.*) to connect the starting caret (^) and ending dollar ($) anchors:

sql
SELECT DISTINCT CITY 
FROM STATION 
WHERE CITY REGEXP "^[AEIOU].*[aeiou]$";
Enter fullscreen mode Exit fullscreen mode

Top comments (0)