How to validate non-english (UTF-8) encoded email address in Javascript and PHP?

前端 未结 7 906
无人及你
无人及你 2020-12-06 06:16

Part of a website I am currently working on contains registration process where users have to provide their email address. Just recently I became aware that non-ascii based

7条回答
  •  隐瞒了意图╮
    2020-12-06 06:49

    what is about something this:

    mb_internal_encoding("UTF-8");
    mb_regex_encoding("UTF-8");
    mb_ereg('[\w]+@[\w]+\.com',$mail,'UTF-8');
    

提交回复
热议问题