I want to retrieve email address from an article when the article is submitted and replace the email address w开发者_JAVA百科ith *
.
I am using preg_match($pattern, $subject, $matches). Does not work throws an error.
$pattern looks like this
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$
I want retrieve the email address and replace it * in the article.
I appreciate any help.
regex is:
#^[^\.][\w-\.]{1,64}[^\.]@([\w-\.]*)(\.\w{2,6})$#i
精彩评论