In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the ASP.NET Validation verification control regular expression special symbol example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
RegularExpressionValidator control expression description:
Square brackets "[]" use and define acceptable characters. [abc123] indicates that the control can only accept six characters: a, b, c, c, 1, 2, and 3
The anti-collection symbol "^" is used to define unacceptable characters. [^ amurh] means that the control can accept all characters except a to h.
Curly braces "{}" define the number of characters that must be entered. {6} means that only 6 characters can be entered; {6,} means that more than 6 characters must be entered, with no upper limit; {2} 6} means that 2 to 6 characters must be entered; but curly braces must be placed after square brackets, for example, [amurz] {4} indicates that any character between 4 digits an and z must be entered.
Dots are used to represent any character. For example, {3pr 6} means to accept 3 to 6 arbitrary characters.
The logical symbol used by the vertical bar "|" to indicate "or". For example, [1-9] {3 A-Za-z 6} | [3] {3} means you can accept 3 to 6 numbers or 3 letters. (you can tell the difference between case and case.)
Parentheses "()" are used for partitioning, similar to parentheses in numeric operations.
Slash "\" if you want acceptable characters to contain the above special characters. For example,\ ([0-9] {3}\) indicates a phone area code entered in the format "(xxx)".
Code demonstration:
Validation validation control
Enter a name:
Enter date:
Enter a numeric value (integer):
Enter a number (1-10):
Please enter a number less than 50:
Enter a random email:
Thank you for reading this article carefully. I hope the article "sample Analysis of Special symbols of regular expressions in Validation validation controls in ASP.NET" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.