2015年11月20日 星期五

查詢常用的 regexp 表示式, 如 email 的 regexp 表示式


常常為了特定常用用途的 regexp 表示式傷腦筋嗎? 像是 email. 現在, 可以到 RegExLib.com 網站去查詢.

http://regexlib.com/Search.aspx?k=email&c=1&m=-1&ps=20

Java 語言的 Regexp:

^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$;
Ref: http://emailregex.com/#comment-1900789300




沒有留言: