英文:
Filter input amount at specific points in regex?
问题
如何使用正则表达式来实现这样的功能...
^[A-Za-z0-9]{1,254}+@$
正则表达式的含义是匹配以字母、数字组成的长度为1到254的字符串,后面紧跟一个"@"符号。
英文:
How would someone do something like this in regex...
^[A-Za-z0-9]{1,254}+@$
答案1
得分: 0
[A-Za-z0-9]{1,254} 表示,
任意字符:'A' 到 'Z','a' 到 'z',
'0' 到 '9'
(重复 1 到 254 次
(尽可能多地匹配)),

编辑: 如果你需要在末尾加上 @,请尝试使用正则表达式 [A-Za-z0-9]{1,254}@。
英文:
[A-Za-z0-9]{1,254} Indicates ,
any character of: 'A' to 'Z', 'a' to 'z',
'0' to '9'
(between 1 and 254 times
(matching the most amount possible)),

Edit: If you need @ at the end try with the regex [A-Za-z0-9]{1,254}@
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论