dual;Select regexp_replace (' AA bb cc ', ' (. *) (. *) (. *) (. *) (. *) ', ' 3, 2, 1 ') from dual;Sql> select * from test;ID MC-------------------- ------------------------------------------------------------A AAAAAA AAAAAb bbbbb
Sql> SELECT * FROM Test where regexp_like (ID, ' B ', ' I '); --No data case sensitive
ID MC-------------------- -----------------------------------------------------
string: the preg_grep () function searches all elements in the array and returns all elements that match a certain pattern.Element array.
Search mode: the preg_match () function searches strings in the search mode. If yes, true is returned. otherwise, false is returned.
Small case of email verification (group application)
All occurrences of the matching mode: the preg_match_all () function matches all occurrences of the pattern in the string, and thenPut all matched values into the arr
the example of a combination of regular expression of the use, after reading you will feel that writing UBB code so simple, as long as you follow me step-by-Step after reading this article you become a UBB master. The exciting thing is that you can write your own UBB tags and no longer have to go to other people to copy ready-made code and templates. Fortunately VBScritp5.0 gave us a "
SQL statement. This query can be a good example of how to shorten SQL length for long query conditions.If you want to download this article, please note that it is free from the copyright colorful, I do not like to see the people who have uploaded my work and do not mention it QQ9256114Regular expressions are a powerful way to specify patterns for complex searches.MySQL is implemented with Henry Spencer's
Analyze and check the regular expression of the email. How do we use to check the regular expression of email? What are the steps required to check the regular expression of email? If you want to check the
Regular Expressions are a powerful way to specify patterns for complex searches.
MySQL adopts the Regular Expression of Henry Spencer, and its goal is to comply with POSIX 1003.2. SeeAppendix C: Thank you. MySQL adopts an extended version to support the pattern matching operation used with the Regexp operator in SQL st
Programming | network | Regular application Example
With a more comprehensive understanding of regular expressions, you can use regular expressions in perl,php, as well as in programs such as ASP.
The following is an example of the PHP language, using the verify that the e-mail address entered by the user online and the URL is in the correct format. PHP provide
verification)Verify mobile phone number (including 159, does not contain PHS)Verify phone number (very complex, vs.net2005 is wrong)Verify PassportVerify IP, verify domain authentication credit card (support Visa Card, MasterCard, Discover, American Express card)Verify ISBN International Standard ISBNVerify GUID Global Unique identifierVerifying file paths and extensionsValidating HTML color values
... ...I knowI've always had a pair of invisible wings.Take me to flyGive me hope.I finallySeeAll
In Linux, Unix-like systems, how do I use the regular expression of the Grep command?Linux comes with the GNU grep Command Tool, which supports extended regular expressions (extended regular expressions), and GNU grep is default on all Linux systems. The Grep command is used to search for any information stored on your
custom tags are commonly known as UBB code. Today's trendy forums support UBB code. Now, let's use the regular expression object together to implement our own colorful UBB code.
First of all, your server side (IIS or PWS) to have a VBScript5.0 support environment, generally refers to the installation of ie5.x can already support the "
,
Occurrence,
Match_parameter)
Source_string is required. It can be a string or variable with quotation marks. Pattern is a regular expression referenced by single quotes. Start_position specifies the exact position in the string. The default value is 1. Occurrence is an option that specifies which string should match relative to other strings during source string matching. Finally, match_parameter is also
Php regular expression failure-maximum backtracking (pcre. backtrack_limit)/recursive restrictions yesterday, a colleague was processing a regular expression collection program and found a strange phenomenon: the local regular expression
regular expression hello | word matches the string hello or string word.As a more complex example, the regular expression B [an] * s matches any of the following strings: Bananas, Baaaaas, Bs, and any other string that starts with B, ends with s, and contains any number of a or n characters
compression package name, delete the extra space caused by misoperation, as well as simple e-mail verification.main roleRegular expressions are primarily used to validate the input data of the client. After the user fills out the form by clicking the button, the form is sent to the server, which is usually further processed by server scripts such as PHP and ASP. Because of client authentication, you can sa
MySQL provides standard SQL mode matching and an extended regular expression mode matching format based on Unix utilities such as vi, grep, and sed.
MySQL provides standard SQL mode matching and an extended regular expression mode
less than dozens of milliseconds, so we need to study REGEXP in depth, because it can greatly shorten the length of SQL statements. for a long query condition, this query can shorten the SQL length.If you want to publish this article, please indicate the location, without the right to publish the copyright, I do not like to see that kind of website my work does not indicate the person QQ9256114Regular Expr
common table expression (CTE), in which the use of a CTE enables the maintainability of the SQL statement, while the CTE is much more efficient than the table variable.
The following is the syntax for a CTE:
Copy Code code as follows:
[With Expression_name [(column_name [, N])]
As
(cte_query_definition)
Now using a CTE to solve the problem above, the
charactersVerify QQ numberVerify e-mail (verify MSN number)Verify the identity card number (rough check, the best server-side tuning class library again fine verification)Verify mobile phone number (including 159, does not contain PHS)Verify phone number (very complex, vs.net2005 is wrong)Verify PassportVerify IP, verify domain authentication credit card (support Visa Card, MasterCard, Discover, American Express card)Verify ISBN International Standar
Label:When querying, it is sometimes necessary to follow certain special rules to find a string, for example, you may need to query the third 5-8, the last four bits of ' 8888 ' all phones. Before 9i, you may need to write a very complex condition:Select username from T_userinfo where (PhoneNumber like ' 135%8888 ' or phonenumber like ' 136%8888 ' or phonenumber like ' 137 %8888 ' or phonenumber like ' 138%8888 ') and length (phonenumber) = 13; Then you'll be envious. Java programmers can easily
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.