Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 193. Valid Phone Numbers
Print only the lines from a file that are exact phone numbers in either (xxx) xxx-xxxx or xxx-xxx-xxxx format. The task tests constructing a concise shell one-liner (regex/grep/awk/sed) that matches these digit-and-punctuation patterns precisely (no extra characters or whitespace).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.