Detecting emails in a text

前端 未结 4 985
生来不讨喜
生来不讨喜 2020-12-31 05:52

I\'m trying to create a function that translates every occurrence of a plain text email address in a given string into it\'s htmlized version.

Let\'s say I h

4条回答
  •  天涯浪人
    2020-12-31 06:39

    filter_var is nice to validate an email, but Dominic Sayers' is_email is even better, and my personal choice.

    source code: http://code.google.com/p/isemail/source/browse/PHP/trunk/is_email.php

    about: http://isemail.info/about

提交回复
热议问题