Regular expression syntax
A regular expression is a text pattern consisting of ordinary characters, such as characters A through z, and special characters (called metacharacters). This pattern describes one or more strings to match when looking up a
Regular expressions are cumbersome, but powerful, learned applications will give you an absolute sense of accomplishment in addition to improving efficiency. It is not a problem to master regular expressions, as long as you read them carefully, add
Full symbolic interpretation of regular expressions
character
Description
\
Marks the next character as a special character, or a literal character, or a backward reference, or an octal escape. For example, ' n '
First, introduce the next few common simple symbols:/love/the part where the "/" delimiter is located is the pattern that will be matched in the target object. The user simply puts the pattern content that you want to find the matching object in
\
Mark the next character as a special character, a literal character, or a backward reference, or an octal escape character. For example, 'n' matches the character "N ". '\ N' matches a line break. The sequence '\' matches "\" and "\ (" matches
This is a lot of time for me to tidy up the regular expression of C #, novice friends note must be manual oh, this can save a lot of time to write code. A brief summary is presented below.Only numbers can be entered: "^[0-9]*$".Only n digits can be
Delete blank line: ^\s*\nremark: here are all the meta characters and a brief description of them
Metacharacters
Describe
\
Marks the next character as a special character, or a literal character, or a backward
Regular expressions, also known as formal expressions, use a single string to describe the formation of a pattern that matches a string that conforms to a rule of a statement, to find and replace a string.Regular expression has its own set of
Username [\ W \-] {3, 12} 3-12 characters (including English letters, numbers ,'-','_') password [\ X21-\ x7e] {3, 8} 3-8 common characters (0x21 to 0x7e) age 1 [0-2] \ d | \ D {129} maximum years old date (19 | 20) \ D {2} [/\ s \-\.] * (0 [1-9] | 1
When developing a project, you may want to know how many files with the suffix. CC,. C, and. h are in the source code file. The following describes how to count the number of files suffixed with. CC,. C, and. h in Linux.
Taking the python 3 source
Guidance:A regular expression is a text mode consisting of common characters (such as characters A to Z) and special characters (such as metacharacters. This mode describes one or more strings to be matched when searching the text subject. A regular
C # Regular Expression Summary
Only numbers are allowed: "^ [0-9] * $ ".
Only n digits can be entered: "^ \ D {n} $ ".
You can only enter at least N digits: "^ \ D {n,} $ ".
Only M ~ can be input ~ N-digit :. "^ \ D {m, n} $"
Only numbers starting
C # Regular Expression Summary
Address: http://www.cnblogs.com/maxianghui/archive/2006/05...
Really good. Thanks to this friend.
Only numbers are allowed: "^ [0-9] * $ ".You can only enter n digits: "^" d {n} $ ".You can only enter at least N
\ Mark the next character as a special character, an original character, or a backward reference, or an octal escape character. For example, 'n' matches the character "N ". '\ N' matches a line break. The sequence '\' matches "\" and "\ (" matches "(
Expression Complete Set
Character
Description
\
Mark the next character as a special character, a literal character, or a backward reference, or an octal escape character. For example,n"Matching character"n". "\nMatch a line
// Check whether it is composed of digits[Code] function isdigit (s) {var patrn =/^ [0-9] {1, 20} $/; If (! Patrn.exe C (s) return false return true} [/Code] // Check Logon Name: You can enter only 5-20 strings starting with a letter, which can
Regular Expression
If you have never used a regular expression, you may not be familiar with this term or concept. However, they are not as novel as you think.
Remember how to find files on the hard disk. Are you sure you want to use? And *
Preface
Regular Expressions are cumbersome, but they are powerful. The application after learning will give you an absolute sense of accomplishment in addition to improving your efficiency. As long as you carefully read these materials and make
Regular Expression learning notes
The regular expression describes a string matching pattern, which can be used to check whether a string contains
There are seed strings, replace matched substrings, or retrieve substrings that meet certain
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.