LoginSignup
1
3

More than 5 years have passed since last update.

メールアドレスの正規表現

Posted at

メールアドレスの正規表現は以下の通りです。
以下はマッチしたそのものを表示します(ファイル名)。

grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" $1

以下はファイル名を除いてマッチした行全体を返します。

grep -E -h "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" $1
1
3
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
1
3