Skip to content

Instantly share code, notes, and snippets.

@jikeytang
Created May 26, 2014 15:08
Show Gist options
  • Save jikeytang/4694e02d315eaaa30dc0 to your computer and use it in GitHub Desktop.
Save jikeytang/4694e02d315eaaa30dc0 to your computer and use it in GitHub Desktop.
[ Javascript ] - 20140527-题目2
判断这个字符串是否是合法的ip地址
PS:
1. 回复时注意加上下面这句话,才会有语法高亮或格式缩进。
```javascript
// you code
```
2. 粘贴代码时请使用shift+tab,缩进前面的空白。
@zjhsd2007
Copy link

呵,你不是已经写出来了么,这个其实就是匹配0-255的数字

@styling
Copy link

styling commented May 30, 2014

A类地址:10.0.0.0~10.255.255.255
B类地址:172.16.0.0~172.31.255.255
C类地址:192.168.0.0~192.168.255.255
然后上正则 这道题 主要考的是 合法ip地址是什么 我还特意查了下 有d,e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment