常见正则表达式

2019-08-28  本文已影响0人  陆阿狸
var pattern = /^[a-zA-Z0-9_-]{4,16}$/;
var pattern = /^\d{1,}$/;
var pattern = /^[A-Za-z0-9]+$/;
var pattern  = /^[a-zA-Z]+$/;
var pattern = /^[a-z]+$/;
var pattern  = /^[A-Z]+$/;
var pattern  = /^((?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])|(\d))+$/
var pattern = /^[^A-Za-z]*$/;
var  pattern = /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/;
var pattern = /^\d+\.\d+$/;
var pattern = /^\d+$/;
var pattern = /^-\d+$/;
var pattern = /^-?\d+$/;
var pattern = /^\d*\.?\d+$/;
var pattern = /^-\d*\.?\d+$/;
var pattern = /^-?\d*\.?\d+$/;
var pattern = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
上一篇下一篇

猜你喜欢

热点阅读