Skip to content

Commit

Permalink
Added: 添加固定电话的正则匹配
Browse files Browse the repository at this point in the history
  • Loading branch information
cdoco authored and ZiHang Gao committed Mar 27, 2017
1 parent 11ff526 commit 0378c00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,21 @@

## 电话

`13012345678`
`13012345678` 手机号

```regex
^1(3|4|5|7|8)\d{9}$
```

![email](images/phone.png)
![phone](images/phone.png)

`XXX-XXXXXXX` `XXXX-XXXXXXXX"` 固定电话

```regex
(\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}
```

![email](images/phone2.png)

## 域名

Expand Down Expand Up @@ -86,10 +94,10 @@
`高子航`

```regex
[\u4e00-\u9fa5]
^[\u4e00-\u9fa5]{0,}$
```

![chinese](images/chinese.png)
![chinese](images/chineses.png)

## 数字正则

Expand Down
Binary file removed images/chinese.png
Binary file not shown.
Binary file added images/chineses.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/phone2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0378c00

Please sign in to comment.