6 kyu
IP Validation
14,333 of 43,364wink
Description:
Write an algorithm that will identify valid IPv4 addresses in dot-decimal format. IPs should be considered valid if they consist of four octets, with values between 0
and 255
, inclusive.
Valid inputs examples:
Examples of valid inputs:
1.2.3.4
123.45.67.89
Invalid input examples:
1.2.3
1.2.3.4.5
123.456.78.90
123.045.067.089
Notes:
- Leading zeros (e.g.
01.02.03.04
) are considered invalid - Inputs are guaranteed to be a single string
Regular Expressions
Algorithms
Similar Kata:
Stats:
Created | Apr 4, 2013 |
Published | Apr 4, 2013 |
Warriors Trained | 95778 |
Total Skips | 13488 |
Total Code Submissions | 360935 |
Total Times Completed | 43364 |
JavaScript Completions | 14333 |
CoffeeScript Completions | 114 |
Python Completions | 15519 |
C Completions | 2837 |
Shell Completions | 547 |
PHP Completions | 2895 |
C# Completions | 3287 |
Go Completions | 3201 |
Elixir Completions | 348 |
Ruby Completions | 369 |
Rust Completions | 653 |
Factor Completions | 8 |
Dart Completions | 85 |
Total Stars | 1334 |
% of votes with a positive feedback rating | 85% of 4361 |
Total "Very Satisfied" Votes | 3232 |
Total "Somewhat Satisfied" Votes | 921 |
Total "Not Satisfied" Votes | 208 |