Linuxで正規表現を使用して複数の電子メールアドレスを照合する方法は?

Linuxで正規表現を使用して複数の電子メールアドレスを照合する方法は?
[email protected]
[email protected]
[email protected]

このメールアドレスを一致させるには? island.ac.kr で終わるすべてのメールアドレス

ベストアンサー1

次の正規表現を使用できます。

.*@island\.ac\.kr$

例:

$ cat /tmp/111
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
$ grep '.*@island\.ac\.kr$' /tmp/111
[email protected]
[email protected]
[email protected]
[email protected]

記号の後の点は@エスケープする必要があります。

おすすめ記事