6 kyu
Valid Phone Number
7,102 of 21,233xDranik
Description:
Write a function that accepts a string, and returns true if it is in the form of a phone number.
Assume that any integer from 0-9 in any of the spots will produce a valid phone number.
Only worry about the following format:
(123) 456-7890 (don't forget the space after the close parentheses)
Examples:
"(123) 456-7890" => true
"(1111)555 2345" => false
"(098) 123 4567" => false
Regular Expressions
Algorithms
Similar Kata:
Stats:
Created | Oct 17, 2013 |
Published | Oct 17, 2013 |
Warriors Trained | 39085 |
Total Skips | 6100 |
Total Code Submissions | 119741 |
Total Times Completed | 21233 |
JavaScript Completions | 7102 |
CoffeeScript Completions | 215 |
Ruby Completions | 1612 |
Haskell Completions | 302 |
Python Completions | 5560 |
Java Completions | 4463 |
Shell Completions | 544 |
C# Completions | 1015 |
C Completions | 743 |
PowerShell Completions | 248 |
Total Stars | 371 |
% of votes with a positive feedback rating | 88% of 2236 |
Total "Very Satisfied" Votes | 1762 |
Total "Somewhat Satisfied" Votes | 407 |
Total "Not Satisfied" Votes | 67 |
Total Rank Assessments | 25 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |