Skip to content

Instantly share code, notes, and snippets.

View gist:7b48121a73a1b92a71eadf90c805bb7d
1)手机号正则 /^1\d{10}$/
2)有效数字正则 /^[+-]?(\d|([1-9]\d+))(\.\d+)?$/
3)验证年龄 18-65 /^((18|19)|([2-5]\d)|(6[0-5]))$/;
4)验证邮箱的正则 /^([\w.-]+)@([0-9a-zA-Z]+)(\.[a-zA-Z]{2,4}){1,2}$/
5)中文名字 /^[\u4e00-\u9fa5]{2,4}$/
6)身份证号
var reg = /^\d{17}(\d|X)$/;
var reg = /^(\d{2})(\d{4})(\d{4})(\d{2})(\d{2})(\d{2})(\d)(\d|X)$/;
7)非空验证 !/^\s*$/
8)去除首尾空格 /(^ +)|( +$)/g
View gist:f03be89d512235f775531c40cb465ddd
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库