Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个文本字段,它应该采用姓名和姓氏(以字母表示),它们之间只有一个空格。
我尝试了以下,
^[a-zA-Z]+$
它工作正常,但只需要字母,
我想在“Paddy Clark”之类的名字之间留一个空格
这该怎么做?
怎么样:
^[a-zA-Z]+ [a-zA-Z]+$