//mailto:が使用されているメールアドレス preg_match_all(“/mailto:(.+?)”/s”, $html2, $matches); //mailto:は使用されておらず、@を基準に判別 preg_match_all(‘/[-.w/]+@[-._[:lower:]d]+.[[:lower:]]{2,4}/s’, $html2, $matches); または、 preg_match_all(‘/[-._a-zA-Z0-9/]+@[-._a-z0-9]+.[a-z]{2,4}/s’, $html2, $matches); 正規表現については、精度の問題もあり、意見が分かれるところだとは思いますが、私の場合は、これで十分だったので、メモとして残しておきます。

この投稿へのコメント

コメントはまだありません。

コメントを残す

メールアドレスが公開されることはありません。

次のHTML タグと属性が使えます。
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CAPTCHA


ピックアップ記事

/etc/hosts ファイルの変更を反映させる

2009年12月05日 過去Blog
hostsファイルの設定を変えた場合は、 # /etc/rc.d/init.d/network resatart または、 # /etc/rc.d/init.d/network reload で反映させる。
「/etc/hosts ファイルの変更を反映させる」をはてなブックマークに追加

UITableView cell の選択を無効にする

2011年04月28日 過去Blog
cell.selectionStyle = UITableViewCellSelectionStyleNone;
「UITableView cell の選択を無効にする」をはてなブックマークに追加

PHP strstr stristr ある文字列が含まれるかどうか調べる

2010年06月11日 過去Blog
$string = 'Hello World!'; if(stristr($string, 'earth') === FALSE) { echo '"earth" not found in string'; } // 出力は "earth" not found in string となります 参照元:http://www.php.net/manual/ja/function.st…
「PHP strstr stristr ある文字列が含まれるかどうか調べる」をはてなブックマークに追加

PHP 配列の結合

2010年05月20日 過去Blog
$array3 = array_merge($array1,$array2); a complete guide to the acai berry diet…
「PHP 配列の結合」をはてなブックマークに追加

PHPで画像をランダム表示

2010年09月25日 過去Blog
とても丁寧に解説してくれているサイトがあったので、メモしておきます。 http://chocobit.com/2007/03/19.php Atlanta insurance recovery…
「PHPで画像をランダム表示」をはてなブックマークに追加
© graffiti on the web . All rights reserved. WordPress Theme by comfy