6 kyu
Valid Phone Number
7,111 of 21,272xDranik
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 | 39160 |
Total Skips | 6102 |
Total Code Submissions | 119877 |
Total Times Completed | 21272 |
JavaScript Completions | 7111 |
CoffeeScript Completions | 215 |
Ruby Completions | 1613 |
Haskell Completions | 302 |
Python Completions | 5572 |
Java Completions | 4473 |
Shell Completions | 544 |
C# Completions | 1021 |
C Completions | 747 |
PowerShell Completions | 248 |
Total Stars | 371 |
% of votes with a positive feedback rating | 88% of 2239 |
Total "Very Satisfied" Votes | 1765 |
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 |