Day 89 of Learning MERN Stack
Hello Dev Community! 👋 It is officially Day 89 of my 100-day full-stack engineering run! 🎯 Yesterday, I kicked off my competitive solving streak on HackerRank. Today, I advanced from standard linear filters into the powerful world of textual pattern recognition by mastering: SQL Regular Expressions (REGEXP) and String Anchors! 🔍🛡️ When processing real-world data pipelines—like validating structured phone inputs, email domains, or parsing specific text queries—standard LIKE operators can make your code messy and repetitive. Today, I solved these constraints elegantly. 🧠 Shifting from Bulky LIKE Statements to Sleek REGEXP As tracked inside my workspace files across "Screenshot (193).png" and "Screenshot (195).png" , I solved two distinct core challenges from the HackerRank series: 1. Match from the Start: Weather Observation Station 6 The Goal: Query the list of CITY names from STATION that start with vowels ( a , e , i , o , u ), ensuring no duplicates are returned. The Evolution: Instead of chaining multiple LIKE queries or cutting sub-strings with LEFT() , I utilized the caret anchor ( ^ ) inside a regular expression array to verify the string's starting boundary instantly: sql SELECT DISTINCT CITY FROM STATION WHERE CITY REGEXP "^(A|E|I|O|U)";