duanmei1850 2012-12-02 10:48
浏览 16

regexp包含æøåÆØÅ也[关闭]

How can i edit this to also accept æøåÆØÅ?

function validate_username($input, $pattern = '/[^A-Za-z0-9]/')
{
     return !preg_match($pattern, $input);
}
  • 写回答

3条回答 默认 最新

  • douliangbian7323 2012-12-02 10:50
    关注
    '/[^A-Za-z0-9æøåÆØÅ]/u'
    

    Requires that your php file is saved in UTF-8 and also that the input is UTF-8 as well of course.

    评论

报告相同问题?