---
title: "常用正则表达式"
author: "lunzi"
date: "2015-02-07T14:19:56Z"
tags: ["正则表达式"]
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2015-02-07T14:19:56Z"
id: 2184306
url: "https://lunzi.iteye.com/blog/2184306"
---

\[code="java"]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace EETOP.AbleAPI.Common { /// /// 常用正则表达式 /// public class CommonRegex { public const string email = "^\\\\w+((-\\\\w+)|(\\\\.\\\\w+))\*\\\\@\[A-Za-z0-9]+((\\\\.|-)\[A-Za-z0-9]+)\*\\\\.\[A-Za-z0-9]+$"; public const string mobile = "^(\\\\+86)?1\[3458]\[0-9]{9}$"; public const string loginname = "\\\\d"; public const string loginnameFormat = "^\[\_a-zA-Z0-9]\[a-zA-Z0-9\_&-]{5,15}$"; public const string postcode = "^\\\\d{6}$"; public const string sourceFormat = "^\[0-9a-zA-Z\_\\\\.]{1,15}$"; public const string enckeyFormat = "^\[0-9a-zA-Z]{32}$"; //public const string telphone = "(\\\\(\\\\d{3,4}\\\\)|\\\\d{3,4}-|\\\\d{3,4})?\\\\d{7,8}$"; public const string loginPhone = "1\[3458]\[0-9]{9}$"; } } \[/code]