經常使用正則表達式

手機號碼: java

^[1][3,4,5,7,8][0-9]{9}$

 

二代身份證號碼:code

^(\\d{17})([0-9]|[X,x])$

 

正整數:class

^[0-9]*[1-9][0-9]*$

 

郵箱:co

\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}\b

中文:中文

^[\\u4e00-\\u9fa5]+$

小數點後兩位:

^\d+\.?\d{0,2}$
相關文章
相關標籤/搜索