export default class Regexps {
constructor() {}
// 正则都是抄的 有什么问题请修正
/***
* 手机号码正则表达式
*/
static mobile = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/;
/***
* 座机正则表达式
*/
static telephone = /^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$|(^(13[0-9]|15[0|3|6|7|8|9]|18[8|9])\d{8}$)/;
/*** 用户名正则
* 1.可以是中英文和·
* 2.长度在16个字符以内
*/
static realName = /^[\u4E00-\u9FA5A-Za-z\s]+(·[\u4E00-\u9FA5A-Za-z]+)*$/;
/*** 登陆账户正则
* 4到16位(字母,数字,下划线,减号)
*/
static userName = /^[a-zA-Z0-9_-]{4,16}$/;
/*** 登陆密码正则
* 1.长度为5-16位至少1个字母,1个数字和1个特殊字符
*/
static password = /^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{5,16}$/;
/**
* 任意数正则
*/
static number = /^(\-|\+)?\d+(\.\d+)?$/;
/***
*正整数
*/
static positiveInteger = /^[1-9]\d*$/;
/***
*正整数或者0, 比如人数或者面积
*/
static positiveInteger0 = /^[+]{0,1}(\d+)$/;
/***
* 正负整数+0
*/
static integerNumber = /^-?[0-9]\d*$/;
/**
* 正数正则
*/
static positiveNumber = /^[+]{0,1}(\d+)$|^[+]{0,1}(\d+\.\d+)$/;
/**
* ip地址正则
*/
static ip = /(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}/g;
/**
* 汉字
*/
static chinese = /^[\u4e00-\u9fa5]*$/;
/**
* 经度
*/
static longitude = /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,6})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,6}|180)$/;
/**
* 纬度
*/
static latitude = /^(\-|\+)?([0-8]?\d{1}\.\d{0,6}|90\.0{0,6}|[0-8]?\d{1}|90)$/;
/**
* 特殊符号
* */
static specialSymbols = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%&*()\-+={}|《》?:“”【】、;‘’,。、]/im;
}