[英]HTML pattern validation for MUI textfiled that accept only *first name one space and first character of the last name*
examples: Idan H - currect Mosh A - currect示例: Idan H - 正确 Mosh A - 正确
Idan Harr - Wrong Mosh Ariasa - Wrong Idan Harr - 错了 Mosh Ariasa - 错了
If you're looking for a regular expression answer (assuming yes judging by one of the tags), you can try: ^[[:alnum:]]+\s.
如果您正在寻找正则表达式答案(假设通过其中一个标签判断是),您可以尝试: ^[[:alnum:]]+\s.
Any alphanumeric character, repeated until a space is reached.任何字母数字字符,重复直到到达空格。 The period at the end grabs a single character, in this case the first letter of the last name.最后的句点抓取一个字符,在这种情况下是姓氏的第一个字母。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.