密碼正則表達(dá)式
1.至少6位并由數(shù)字和字母組成:
let password = /^(?!\d+$)(?![A-Za-z]+$)[a-zA-Z0-9]{6,}$/;
2.至少6位并由字母(區(qū)分大小寫)、數(shù)字募闲、符號(hào)其中2種組成:
let password = /^(?!\d+$)(?![A-Za-z]+$)(?![-.!@#$%^&*()+?><]+$)[a-zA-Z0-9-.!@#$%^&*()+?><]{6,}$/;
郵箱正則表達(dá)式
let email = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
手機(jī)號(hào)正則表達(dá)式
let tel = /^[1][3,4,5,6,7,8][0-9]{9}$/;
網(wǎng)址正則表達(dá)式
let url = /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/;