If "^" is displayed in "[]", this expression does not match the characters in, for example, "/[^ a-z]/" does not match any lower-case letters! The regular expression provides the following default values:'[: Alnum:]' matches any letterAlphanumeric
If "^" appears in "[]", this expression does not match the characters appearing in "[]", such as "/[^a-z]/" does not match any lowercase letters! And the regular expression gives several default values for "[]", as follows:
' [: alnum:] ' matches
Oracle Regular expressions use the introduction of regular expressions with powerful, convenient and efficient text processing capabilities. Ability to add, delete, analyze, overlay, insert, and reshape various types of text and data. Oracle
The following examples illustrate how to use regular expressions to solve common problems in work.1.REGEXP_SUBSTRThe REGEXP_SUBSTR function uses a regular expression to specify the start and end points of the returned string, and returns the same
ProgramThe employee is very lazy. We all know that the member variables need to be initialized, or the problem may be very painful. However, for a class with 50 variables, it is silly to write the initialization method one by one, and it cannot be
The following examples illustrate the use of regular expressions to handle problems that are common in some jobs.
1.
Regexp_substr
The REGEXP_SUBSTR function uses regular expressions to specify the start and end points of the return string, and to
Requirements:
Match the mobile phone number. The first digit can be "+", but not "+". The following digits are all numbers, for example:
+ 861359415665
8613659558555
1356856455
Are valid.
+ Aa156945555
Aa1359556666
Aaddssdfdfsd
Are
Demand:Match the phone number, the first bit can be +, can not +, the back of all if the number, such as:+86135941566586136595585551356856455are legal.+aa156945555aa1359556666Aaddssdfdfsdare not legal.Regular:[SQL]View Plaincopyprint?
Sql>
Demand:Match the phone number, the first bit can be +, can not +, the back of all if the number, such as:+86135941566586136595585551356856455are legal.+aa156945555aa1359556666Aaddssdfdfsdare not legal.Regular:[SQL]View Plaincopyprint?
Sql>
Regular ExpressionsRegexp_like performing Regular expression matchingSELECT first_nameFrom EMPLOYEESWHERE regexp_like (first_name, ' ^al (An|yss) a$ ', ' I ');--al is followed by an OR YssSELECT first_nameFrom EMPLOYEESWHERE regexp_like (first_name,
REGEXP_LIKE (matching)REGEXP_INSTR (included)REGEXP_REPLACE (replace)REGEXP_SUBSTR (extract)
For example, the expression of the mobile phone number: ^ [1] {1} [35] {1} [[: digit:] {9} $You can query customer information tables (tKHXX) that contain
Data acquisition, most of the regular expression, I simply introduce how to achieve the idea of acquisition. This is the implementation of PHP. It's not wise to put it in the space, because it's not only very resource-intensive but also supports
Most of the data is collected using regular expressions. I will briefly introduce how to implement data collection. this is the php implementation. it is generally run on the local machine and it is unwise to put it into space, because not only does
Pattern matching for MySQL WHERE clauseToday in the application of this problem encountered,There is a field T1, where the value is similar to: 1,1,1,2,3,3,4,4,5,5,2,4,3,2,1,2Need to search from inside for example: the first comma before the number
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.