[英]PHP Regular Expression. Must begin with specific word and after any number. Can't have space
[英]php regular expression. Alphabet with spaces only after the first word
什么是允許字母和空格的php正則表達式。 但只有在第一個單詞之后的空格?
謝謝
$rex = '/^[a-zA-Z][a-zA-Z ]*$/';
要么
$rex = '/^[a-z][a-z ]*$/i'; // i means case insensitive
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.