当前位置:网站首页>C common regular expression collation
C common regular expression collation
2022-06-24 02:40:00 【Master coder】
C# Common regular expressions
- Non-negative integer ( Positive integer + 0): "^\d+$"
- Positive integer "^[0-9][1-9][0-9]$"
- Non positive integer ( Negtive integer + 0)"^((-\d+)|(0+))$"
- Negtive integer "^-[0-9][1-9][0-9]$"
- Integers "^-?\d+$"
- Nonnegative floating point number ( Positive floating point + 0) "^\d+(.\d+)?$"
- Positive floating point "^(([0-9]+.[0-9][1-9][0-9])|([0-9][1-9][0-9].[0-9]+)|([0-9][1-9][0-9]))$"
- Non positive floating point number ( Negative floating point number + 0) "^((-\d+(.\d+)?)|(0+(.0+)?))$"
- Negative floating point number "^(-(([0-9]+.[0-9][1-9][0-9])|([0-9][1-9][0-9].[0-9]+)|([0-9][1-9][0-9])))$"
- Floating point numbers "^(-?\d+)(.\d+)?$"
- from 26 A string of English letters "^[A-Za-z]+$"
- from 26 A string of uppercase letters "^[A-Z]+$"
- from 26 A string of lowercase letters "^[a-z]+$"
- By numbers and 26 A string of English letters "^[A-Za-z0-9]+$"
- By digital 、26 A string of English letters or underscores "^\w+$"
- email Address "^[\w-]+(.[\w-]+)*@[\w-]+(.[\w-]+)+$"
- url "^[a-zA-z]+://(\w+(-\w+))(.(\w+(-\w+)))(\?\S)?$"
- year - month - Japan /^(d{2}|d{4})-((0([1-9]{1}))|(1[1|2]))-((0-2)|(3[0|1]))$/
- month / Japan / year /^((0([1-9]{1}))|(1[1|2]))/((0-2)|(3[0|1]))/(d{2}|d{4})$/
- Email "^([w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$"
- Phone number "(d+-)?(d{4}-?d{7}|d{3}-?d{8}|^d{7,8})(-d+)?"
- IP Address "^(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5]).(d{1,2}|1dd|2[0-4]d|25[0-5])$"
- YYYY-MM-DD Basically, leap years and 2 Month and so on have been taken into account ^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$
- picture src[^>]*[^/].(?:jpg|bmp|gif)(?:\"|\')
- Matching Chinese ^([\u4e00-\u9fa5]+|[a-zA-Z0-9]+)$
- matching html Medium A label "\<a.+?href='""(?!mailto\:)(?>foundAnchor>[^'"">]+?)[^>]*?>"
- Match double byte characters ( Including Chinese characters ):[^\x00-\xff]
- Regular expressions matching empty rows :\n[\s| ]*\r
- matching HTML Tagged regular expression :/<(.)>.<\/\1>|<(.*) \/>/
- Regular expression matching the leading and trailing spaces :(^\s)|(\s$)( image vbscript Like that trim function )
边栏推荐
- How to design and make ppt gradient effect?
- IPhone sending SMS implementation
- How to apply for top-level domain names? What are the types of top-level domain names?
- What about foreign trade companies? Is this another difficult year?
- What is the large bandwidth of IDC machine room?
- Using the database middleware MYCAT to realize read-write separation (dual master and dual slave)
- In PHP, use recursive depth to merge multiple arrays
- Leetcode969: pancake sorting (medium, dynamic programming)
- How to understand EDI requirements of trading partners
- Deep and shallow copy
猜你喜欢
随机推荐
How to transfer files from the server connected to the fortress machine and how to access the server through the fortress machine
SAP retail characteristic profile I
How to enable IPv6 network access for personal broadband
The whole procurement process of the procurement mall website in the transportation industry is electronic to reduce the procurement cost
Centeros environment setup
IOS development - multithreading - thread safety (3)
Start tcapulusdb process
Cloud rendering: cloud exhibition hall of Tencent digital ecology Conference - open roaming mode on cloud
[Tencent cloud load balancing CLB] cross region binding 2.0 (new version) idc-ip best practices!
Flink practice tutorial: getting started 1- zero basic users realize simple Flink tasks
Mysql Find_ IN_ Set function
How much does it cost to rent a cloud game server? Which cloud game server is more reliable?
Tidb HTAP Getting Started Guide - how to add a copy of tiflash
How to build your own cloud game server and what are the building steps
How to recover the garbled words in the software?
Question: can you get download the resources of Baidu online disk?
What are the main functions of DNS? What are the benefits of IP address translation
What is the difference between trademark registration and company domain name? What is the difference between the two?
Go language starts again, go modules' past life, present life and basic use
Afnetworking server client



