MERN 스택 학습 89일차

작성자

카테고리:

← 피드로
DEV Community · Ali Hamza · 2026-06-30 개발(SW)

Ali Hamza

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)";

Enter fullscreen mode Exit fullscreen mode

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다