<?php $a = 'joe@example.org'; $b = 'bogus - at - example dot org'; $c = '(bogus@example.org)'; $sanitized_a = filter_var($a, FILTER_SANITIZE_EMAIL); if (filter_var($sanitized_a, FILTER_VALIDATE_EMAIL)) { echo "処理済の (a) はメールアドレスとして有効です。\n"; } $sanitized_b = filter_var($b, FILTER_SANITIZE_EMAIL); if (filter_var($sanitized_b, FILTER_VALIDATE_EMAIL)) { echo "処理済のメールアドレスは有効です。"; } else { echo "処理済の (b)