How do I allow spaces in this regex?

前端 未结 6 1325
渐次进展
渐次进展 2021-01-12 02:05

I\'m such an amateur at regex, how do I allow spaces(doesn\'t matter how many) in this regex?

if(preg_match(\'/[^A-Za-z0-9_-]/\', $str)) return FALSE;
         


        
6条回答
提交回复
热议问题