0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【VB.NET】E-Mailアドレスの正規表現

Posted at

E-Mailの正規表現

VB.NETの場合

' ローカル部分の連続するドット、先頭末尾のドットを禁止
^[a-zA-Z0-9_+-]+(\.[a-zA-Z0-9_+-]+)*@([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$
  • [a-zA-Z0-9_+-]+ :半角英数字と_+-を1回以上繰り返す。
  • (.[a-zA-Z0-9_+-]+)* :.と半角英数字と_+-を0回以上繰り返す。
  • @([a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]*.)+ :
    • ローカル部分を@で結ぶ。
    • 半角英数字または、半角英数字と-を0回以上繰り返すまたは、半角英数字を0回以上繰り返す。そのあと.で結んだ文字を1回以上繰り返す。
  • [a-zA-Z]{2,} :半角英字を最低2回以上繰り返す。(トップレベルドメイン)

参考サイト

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?