This topic created in 4117 days ago, the information mentioned may be changed or developed.
对写正则比较弱,希望大家帮忙写一个适用于PHP的正则,谢谢!
3 replies • 2015-06-01 17:33:35 +08:00
 |
|
1
imn1 Jun 1, 2015 1
^[A-Za-z\u4e00-\u9fcf](?:(?! )[A-Za-z \u4e00-\u9fcf]])+$ 没环境测试
|
 |
|
2
minuux Jun 1, 2015
preg_match('/^[^\d\W][\w]+$/iu', $str) ? TRUE : FALSE;
|
 |
|
3
minuux Jun 1, 2015
看错了,原来要可以使用空格...可以在那基础上稍微改下
|