Standard SQL pattern matching
SQL pattern matching allows you to match any single character with "_", while "%" matches any number of characters (including 0 characters). In MySQL, the SQL schema defaults to ignoring the case. Some examples are
The String method that matches the regular expression pattern. The regular expression is string.
In JavaScript code, regular expressions are used for pattern matching. Some methods of String objects and RegExp objects are often used, such as replace,
New users seek advice ~ Why do I feel useless about the regular expression pattern modifier e? For example, the two pieces of code match the URL link in the string. this is the pattern modifier e: $ urlPattern & nbsp ;=& nbsp; "/(www. | https? : \/|
New users seek advice ~ Why do I feel useless about the regular expression pattern modifier e? For example, the two pieces of code match the URL link in the string. This uses the pattern modifier e: $ urlPattern & nbsp; (www. | https? : | Ftp: |
Modifier is an important reference for regular expressions in php. Next I will explain the Regular Expression Pattern modifier in PHP, for more information, see references.
The PHP pattern modifier, also known as the pattern modifier, is used
Basic knowledge of regular expression pattern matching string, regular expression string
Introduction
There is a function implementation in the actual project that needs to parse strings of some specific modes. In the existing code library, some
Java.util.regex is a class library package that matches strings by using regular expression-ordered patterns.1. Introduction:Java.util.regex is a class library package that matches strings by using regular expression-ordered patterns.It consists of
Regular expressions, also known as regular expressions. A concept of computer science. Regular tables are often used to retrieve and replace text that conforms to a pattern (rule). Many programming languages support the use of regular expressions
New users seek advice ~ Why do I feel useless about the regular expression pattern modifier e? For example, the two pieces of code match the URL link in the string. This uses the pattern modifier e: $ urlPattern & nbsp; (www. | https? : | Ftp: |
For beginnersPattern modifier:
The pattern modifier is marked out of the entire pattern.
I: The characters in the mode match both uppercase and lowercase letters.
M: The string is treated as multiple rows.
S: The string is regarded as a single line,
This article mainly introduces the regular expression pattern matching string basic knowledge, divided into matching string basic rules and regular matching, find and replace knowledge, this article introduces you very good, the need for friends can
Pattern correction symbols are used outside the regular expression delimiters (after the last slash "/"), for example, "PHP/I ". "/PHP/" is a regular expression pattern, and "I" is the corrected symbol used to correct this pattern, which is case
http://web.jobbole.com/85433/@ Bole Online-Fire of LiaoyuanUsing regular expressions for pattern matching in JavaScript code often uses several methods of string objects and RegExp objects, such as replace, match, search, and the following is a
PHP extension text processing-the PCRE regular expression pattern modifier lists currently available PCRE modifiers. The names mentioned in brackets are the names of these modifiers in PCRE. Space in the pattern modifier. line breaks are ignored.
Regular Expression Pattern modifier, regular expression Modifier
I (PCRE_CASELESS)
If this modifier is set, the letters in the mode are case-insensitive.
M (PCRE_MULTILINE)
By default, PCRE considers the target string to be composed of single-line
The regular expression pattern modifier "e" is used. I remember when I learned php, the teacher said "e" is used with preg_replace ($ reg, $ replace, $ text ). The replaced content ($ replace) can use the submode in regular $ reg, but the following
The PHP pattern modifier, also known as the pattern modifiers, is used outside the delimiter of the regular expression. Mainly used to adjust the interpretation of regular expressions, to extend the regular expression in the matching, substitution
1 varpattern=/google{4,8}$/;//{4,8}$ Indicates the end of the match 4-8 times2 varStr= ' googleeeeeeeee ';//4-8 times for e3 Alert (pattern.test (str));4 5 varpattern=/(google) {4,8}$/;//grouping, which can be seen as a character6 varStr= '
Special character Matching1 var pattern=/\[/; // use the \ symbol to escape special characters in the regular to match 2 var str= ' ['; 3 alert (pattern.test (str));Line break mode1 var pattern=/\d+/g; // Unqualified first match 2 var str= '
The PHP pattern modifier, also known as the pattern modifiers, is used outside the delimiter of the regular expression. Mainly used to adjust the interpretation of regular expressions, to extend the regular expression in the matching, substitution
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.