Search
⌘K

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.

Comments

Your account is free and you can post anonymously if you choose.