【发布时间】:2009-04-21 21:29:37
【问题描述】:
我怎样才能在这种模式中允许破折号?
$str = preg_replace ( "/[^a-z \d]/i", "", $str ) ;
【问题讨论】:
我怎样才能在这种模式中允许破折号?
$str = preg_replace ( "/[^a-z \d]/i", "", $str ) ;
【问题讨论】:
把它放在第一位。
$str = preg_replace ( "/[^-a-z \d]/i", "", $str ) ;
【讨论】: