php - Retrieve and replace email address using preg_match & preg_replace -


I want to retrieve an email address from an article when the article is submitted and * .

I'm using preg_match ($ pattern, $ theme, $ matches). Does not work throws an error.

$ pattern looks like this

  ^ [_ a-z0-9 -] + (\. [_A-z0-9-] +) * @ [A-z0-9 -] + (\ [A-z0-9 -] +) * (\. [Az] {2,3}) $   

I email addresses I want to retrieve it and I want to change it in article.

I appreciate any help.

is regex:

  # ^ [^.] [ \ W - \.] {1,64} [^ \.] @ ([\ W-.] *) (\. \ W {2,6}) $ # i   < / Div> 

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -