简体   繁体   English

一开始它至少接受 3 个字母,然后在 .net 中接受数字和特殊字符

[英]the beginning it accepts at least 3 letters and from there numbers and special characters in .net

Good afternoon colleagues I have the following regular expression in .net My purpose is that at the beginning it does not contain space, also accept at least 3 letters and hence numbers and special characters, but I can not do it, any recommendation同事们下午好 我在 .net 中有以下正则表达式 我的目的是一开始它不包含空格,也接受至少 3 个字母,因此接受数字和特殊字符,但我做不到,任何建议

Regex regex = new Regex(@"^([a-zA-ZäÄëËïÏöÖüÜáéíóúáéíóúÁÉÍÓÚÂÊÎÔÛâêîôûàèìòùÀÈÌÒÙ]{3})+?^[_@./#&+-]+?[a-zA-ZäÄëËïÏöÖüÜáéíóúáéíóúÁÉÍÓÚÂÊÎÔÛâêîôûàèìòùÀÈÌÒÙ0-9\s].+\w$");
Match match = regex.Match(accountName);
return match.Success;
If(!accountName[0]==String.Empty && accountName.Length>3)
return true;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 正则表达式与数字和特殊字符,但没有字母 - Regex with numbers and special characters but no letters 瑞典字母在asp.net中显示为特殊字符 - Swedish letters display as special characters in asp.net 我需要验证字符串的第一个字符是否为字母,下一个字符是否为字母或数字或特殊字符 _、-、。 和空间 - I need to validate if first character of a string is a letter and next characters are either letters or numbers or special characters _,-,. and space ASP.NET中按字母,数字和字符进行的高级排序实现 - Advanced sorting implementation in ASP.NET by letters, numbers & characters 如何编写仅允许字母,数字和特殊字符(仅中间出现)的正则表达式 - How to Write a Regular Expression that allows only letters, numbers and special characters only i the middle never in the end 如何在C#中没有特殊字符或数字的情况下用字母(az)询问用户输入 - How to ask for user input with letters (a-z) only without special characters or numbers in C# 在RichTextBox中显示特殊字符(韩文字母) - Display Special Characters (Korean Letters) in RichTextBox 用于捕获字母之间具有特殊字符的单词的正则表达式 - Regex for catching word with special characters between letters 英文字母和特殊字符的正则表达式 - Regex Expression for english letters and special characters jQuery MVC-接受字母和数字的蒙版文本框 - JQuery MVC - Masked Textbox that accepts both letters and numbers
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM