6 kyu
IP Validation
14,488 of 43,973wink
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 | 96926 |
Total Skips | 13518 |
Total Code Submissions | 363565 |
Total Times Completed | 43973 |
JavaScript Completions | 14488 |
CoffeeScript Completions | 115 |
Python Completions | 15812 |
C Completions | 2861 |
Shell Completions | 554 |
PHP Completions | 2915 |
C# Completions | 3338 |
Go Completions | 3233 |
Elixir Completions | 351 |
Ruby Completions | 379 |
Rust Completions | 676 |
Factor Completions | 8 |
Dart Completions | 96 |
TypeScript Completions | 24 |
Lua Completions | 7 |
Kotlin Completions | 8 |
Groovy Completions | 2 |
Total Stars | 1341 |
% of votes with a positive feedback rating | 85% of 4392 |
Total "Very Satisfied" Votes | 3255 |
Total "Somewhat Satisfied" Votes | 929 |
Total "Not Satisfied" Votes | 208 |