constraint. It verifies the correct social Security number format when inserting or updating. Social Security numbers in formats such as 123-45-6789 and 123456789 for this column constraint is an acceptable value. Valid data must start with three digits, followed by a hyphen, plus two digits and a hyphen, and finally four digits. The other expression allows only 9 consecutive digits. The vertical bar symbo
Ordinary characters
Normal characters are made up of all print and nonprinting characters that are not explicitly specified as metacharacters. This includes all uppercase and lowercase alphabetic characters, all numbers, all punctuation marks, and some symbols.
The simplest regular expression is a single ordinary character that matches the character itself in the searched string. For example, the single character pattern ' a ' can match the letter '
results of the plural.
9. What should I do if a keyword uses a hyphen, such as "high-tech training" and a keyword without a hyphen is used for search?
A: If you are sure that most people use a keyword query without a hyphen, you should remove the hyphen for security reasons, but it does not matter that most search
the system
VB helps install the system disk MSDN. the most convenient way to use VB is to select the target object and press the F1 key to display the help information of this object.
1.2 Common Errors and difficulties
1. punctuation Error
In VB, only Chinese Punctuation Marks can be used. Any Chinese Punctuation Marks generate an "invalid character" error durin
encoded in the UTF-8 format.2.URL Character Classification literal characters : In the URL does not represent special meaning, just as a normal string appears. The RFC3986 documentation provides the following:These includeuppercase and lowercase letters, decimal digits, hyphen, period, underscore,and tilde.literal character = alpha/digit/"-"/"." / "_" / "~"reserved Characters :URLs can be divided into several components, protocols, hosts, paths, and
word "hi", we should use \ bhi \ B.
\ B is a special code specified by a regular expression (well, some people call it metacharacter). It represents the start or end of a word, that is, the boundary of a word. Although English words are generally separated by spaces, punctuation marks, or line breaks, \ B does not match any of these word delimiters.Match only one location.
2)If other metacharacters are used at the same time, we can construct a
{N, m}
Repeat n to m times
Example: ^ \ D {5, 12} $ matchA separate string consisting of 5 to 12 digits(For example, QQ number)
Escape Character \
If you want to find the metacharacters themselves, for example, if you want to find. Or *, you need to use the Escape Character '\'
Example: deerchao \. Net matchDeerchao.net, C: \ Windows matchC: \ WINDOWS.
Character class []
What should I do if I want to match character sets that do not have predefined metac
PHP regular expressions do not capture the source: www.iq662.com has been replaced, and now it is time to solve the problem of three or four-bit area codes. Replacement in a regular expression refers to several rules. if any rule is satisfied, it should be regarded as a match. the specific method is to use | to separate different rules. Can't you understand? It doesn't matter. let's look at the example: 0d {2}-d {8} | 0d {3}-d {7} this expression can match two types of e-PHP regular expressions
example:
[Aeiou]
Can be used to denote a vowel child.You can also describe a range, as preceded by a hyphen, or it can be a range set:
[A-za-z]
This range set represents any uppercase and lowercase letters.In addition, you can use a collection to indicate that a character does not belong to a set. For example:
[^a-z]
Can be used to match any character that is not between A and Z. Indicates no when the caret (^) is
, the goal is well done--you see, I haven't been able to write everything down myself, have I?
What exactly is a regular expression?
When writing a program or Web page that handles strings, there is often a need to find strings that match some of the complex rules. Regular Expressions are the tools used to describe these rules. In other words, regular expressions are code that records text rules.
It is likely that you have used the wildcard character (wildcard)for file lookup under Windows/do
What is a regular expression?When writing a program or Web page that handles strings, there is often a need to find strings that match certain complex rules. Regular expressions are the tools used to describe these rules. In other words, the regular expression is the code that records the text rule. Meta character\bA special code specified by a regular expression that represents the beginning or end of a word, which is the boundary of a word. Although English words are usually delimited by spac
, the invalid escape. Many people can't remember what symbols should be escaped in the regular, which should not be escaped, such as double quotes "in the regular do not need to escape, if you write a/\"/, usually, JavaScript's regular engine will help you to remove:/^\ "$/.test ('" ')//TrueHowever, if this regex turns on Unicode mode, this will result in a syntax error:/\ "/u//Syntaxerror:invalid escapeThen you might ask, why do you want to turn on Unicode mode? This is because Unicode mode is
/punctuation + @ + text/number/character string +.) + literal/numeric string with hyphens)==> ^[a-za-z0-9_\-.] [Email protected] [A-za-z0-9\-]+\. [a-za-z0-9\-.] +$Which ^[a-za-z0-9_\-.] + means "at least one letter (any case), number, underscore, hyphen, dot (.), orThese characters are combined as the starting string "(Start the string with at least one letter,number,underscore,
, "aaa ".Character [xyz]Meaning: a one-character list that matches any character in the list. You can use a hyphen to indicate a character range.For example, [abcd] is the same as [a-c. They match 'B' in "brisket" and 'C' in "ache '.Character [^ xyz]Meaning: A character complement, that is, it matches everything except the listed characters. You can use a hyphen
PHP regular expressions do not capture Source: http://www.iq662.com replaced, now it's time to solve the problem of 3 or 4-bit area code. Replacement in a regular expression refers to several rules. if any rule is satisfied, it should be regarded as a match. the specific method is to use | to separate different rules. Can't you understand? It doesn't matter. let's look at the example: 0 \ d {2}-\ d {8} PHP regular expression not captured
Source: http://www.iq662.com
Replace
Now it's time to sol
matches only one character.
We can list a collection, for example:
[Aeiou]
Can be used to denote a vowel child.
You can also describe a range, as preceded by a hyphen, or it can be a range set:
[A-za-z]
This range set represents any uppercase and lowercase letters.
In addition, you can use a collection to indicate that a character does not belong to a set. For example:
[^a-z]
Can be used to match any character that is not betw
Metacharacters
\ B indicates the start or end of a word, that is, word separation. For example, how are you? To find out the word are, use \ Bare \ B.
. Match any character except line breaks
\ D indicates a number, such as \ D-\ D, which can match 2-2 3-3.
\ W letters, numbers, underscores, or Chinese Characters
\ S matches any blank characters
^ Starts with a string
$ End of a string
Repeated
* (Repeated 0 times or more times) indicates that the content of the front edge can be repeated
that match any character except the line break. * It is also a metacharacter, but it does not represent a character, nor a position, but a number-It specifies * the content of the front edge can be repeatedly used for any consecutive times to match the entire expression. Therefore,. * When connected, it means that any number of characters do not contain line breaks. Now \ bhi \ B. * \ bLucy \ B is very obvious: first, a word hi, then any character (but not a line break), and finally Lucy.
The l
Column directory, the *.txt in dir *.txt or LS *.txt is not a regular expression, because the meaning of this * is different from that of the regular type.
A regular expression is a literal pattern consisting of ordinary characters, such as characters A through z, and special characters, called metacharacters. A regular expression is used as a template to match a character pattern with the string being searched for.3.1 Ordinary characters
Consists of all print and nonprinting characters that ar
result-oriented perspective, the bug was "fixed", but after 35 such repetitions, I began to question the following:
What exactly are Word-wrap and word-break?
Why do you have to repeat this problem?
Is the question a problem?
rules
Before we can dispel doubts, there are several objective realities that concern the nature of the problem that need to be pointed out, because these "common sense" are most easily overlooked:
CJK text and! CJK text has its own typesetting rules.
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.