%\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b%
how do i make this understood for PHP
i want to find all email addresses in an html doc
%\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b%
how do i make this understood for PHP
i want to find all email addresses in an html doc
PHP supports Perl regex through the preg_replace and preg_match functions. You don't need to change your regex at all.
preg_match_all will generate a list of all matches. php.net/manual/en/function.preg-match-all.phppreg_match('/your pattern/') See php.net/manual/en/regexp.reference.delimiters.php