正则表达式示例

^[1-9]\\d*(,[1-9]\\d*)*$
1232323,12343343,5645645430284290,23131,2131

if (RegularUtil.regular(title, "^[\u4e00-\u9fa5]{6,30}$")) {
			errCount++;
		} else if (RegularUtil.regular(areaName, "^[\u4e00-\u9fa5]{4,30}$")) {
			errCount++;
		} else if (RegularUtil.regular(roleName, "^[\u4e00-\u9fa5]{6,30}$")) {
			errCount++;
		} else if (RegularUtil.regular(url, "[a-zA-z]+://[^\\s]*")) {
			errCount++;
		} else if (RegularUtil.regular(url2, "[a-zA-z]+://[^\\s]*")) {
			errCount++;
		} else if (RegularUtil.regular(desc, "^[\u4e00-\u9fa5]{0,500}$")) {
			errCount++;
		} else if (RegularUtil.regular(type, "^[1-9]\\d*$")) {
			errCount++;
		} else if (RegularUtil.regular(typeName, "^[\u4e00-\u9fa5]{4,20}$")) {
			errCount++;
		}
 

相关推荐