question mark after the repeated qualifier modifier, or lazy mode, or greedy mode.Greedy quantifier, is to eat all the characters first, and then spit out one by one, until the match is successful.Lazy quantifier, is to start from the beginning of a character to eat, until the match is successful. That is, greed is a gradual forward match, and laziness is a backward and slow match.Example:Summarize:Personally, through regular expressions in the clien
return characters(2) Character class:A, [ABC] A, B or Cb, [^ABC] any character except A, B, or C (negation)C, [a-za-z] A to Z or A to Z (range)(3) Predefined character classes:A. Any character, if it is ".", then ". "Write regular expression when writing" \. "B, \d number [0-9], write "\d" when writing regular expressionsC, \w Word character: [a-za-z_0-9] (lette
A regular expression was contacted in ASP. NET, which was already encapsulated in the editor. This time in JS again contact, feel understanding is not very in place, it is necessary to sum up a bit. Through regular expression can save a lot of conditions to judge, it is very convenient to use. When writing a program or
] ", in this way, can provide some equivalent to the HTML code features, but also avoid the forum to be malicious attacks, these custom tags are commonly known as UBB code." Today's trendy forums support UBB code, such as: http://www. Chinaasp. COM (Dynamic Technology Network) of the forum is very good support UBB code. Now, let's use the regular expression object together to implement our own colorful UBB
Regular Expression?
Regular ExpressionsProgramBut not all developers know this. Regular Expressions can be seen as small ones with specific functionsProgramming Language: Locate a substring in a large string expression. It is not a new technology. It was initially developed
mode.Greedy quantifier, is to eat all the characters first, and then spit out one by one, until the match is successful.Lazy quantifier, is to start from the beginning of a character to eat, until the match is successful. That is, greed is a gradual forward match, and laziness is a backward and slow match.Example:var pattern=/[a-z]+?///? The greedy match was turned off, only the first one was replacedvar str= ' Ajfifdjnfasdfdasdgh ';var result=str.replace (pattern, ' xxx ');alert (result); Back
PLSQL _ basic Series 1 _ Regular Expression REGEXP_LIKE/SUBSTR/INSTR/REPLACE, plsqlregexp_like
2014-11-30 BaoXinjian
I. Summary
There are four functions that support regular expressions in ORACLE:
1 REGEXP_LIKE: similar to LIKE
2 REGEXP_INSTR: similar to INSTR
3 REGEXP_SUBSTR: similar to SUBSTR
4 REGEXP_REPLACE: similar to REPLACE
They are used in the same way a
' in ' plain '.
[^...]
Negative character set. Matches any character that is not contained. For example, ' [^ABC] ' can match ' P ' in ' plain '.
P1|p2|p3
Match P1 or P2 or p3. For example, ' Z|food ' can match "z" or "food". ' (z|f) Ood ' matches "Zood" or "food".
*
Matches the preceding subexpression 0 or more times. For example, zo* can match "z" and "Zoo". * Equivalent to {0,}.
+
Matches the preceding subexpression
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 Passport
Verify IP, verify domain authentication credit card (support Visa Card, MasterCard, Discover, American Express card)Verify ISBN International Standard ISBN
Verify GUID Global Unique identifierVerifying file paths and extensionsValidating HTML color values
... ...I knowI've always had a pair of invisible wings.Take me
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 invalid.
Regular Expression:
SQL> select * from dual where regexp_like ('+ 333333', '^ [\ +] * [: digit:] +'); -- This + escape or n
Oracle Regular Expression functions: regexp_like, regexp_substr, regexp_instr, regexp_replace SQL code Oracle can't do without these four functions: 1. Regexp_like 2. Regexp_substr 3. Regexp_instr 4. Regexp_replace www.2cto.com can be used to guess the function name. Regexp_like can only be used for conditional expressions. It is similar to like but matches with
-05-13 | NULL |
+-------+--------+---------+------+------------+-------+
MySQL provides standard SQL pattern matching and a format for extending regular expression pattern matching based on Unix utilities like VI, grep, and sed.
Extended Regular expression pattern matchin
Label:found that Oracle supports regular expressions. First collection. There are four main functions in Oracle that support regular expressions:1,regexp_like: Similar to the function of like2,REGEXP_INSTR: Similar to the function of INSTR3,REGEXP_SUBSTR: Similar to the function of SUBSTR4,regexp_replace: Similar to the function of REPLACEThey are used in the same way as Oracle
|
+----------+-------+---------+------+------------+------------+
| Claws | Gwen | Cat | m | 1994-03-17 | NULL |
| Bowser | Diane | Dog | m | 1989-08-31 | 1995-07-29 |
| Whistler | Gwen | Bird | NULL | 1997-12-09 | NULL |
+----------+-------+---------+------+------------+------------+
Since a regular expression appears anywhere in the value and its pattern matches, there is no need to place a wildcard on
'.
[^...]
Negative character set. Matches any character that is not contained. For example, ' [^ABC] ' can match ' P ' in ' plain '.
P1|p2|p3
Match P1 or P2 or p3. For example, ' Z|food ' can match "z" or "food". ' (z|f) Ood ' matches "Zood" or "food".
*
Matches the preceding subexpression 0 or more times. For example, zo* can match "z" and "Zoo". * Equivalent to {0,}.
+
Matches the preceding subexpression one or more t
custom tags are commonly known as UBB code. Today's trendy forums support UBB code, such as: http://www. Chinaasp. COM (Dynamic Technology Network) of the forum is very good 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 envir
' int (4) not NULL auto_increment,' charList ' varchar default NULL,PRIMARY KEY (' id ')) Engine=myisam DEFAULT Charset=utf8 auto_increment=7;Import test DataINSERT into ' string_find ' (' id ', ' charList ') VALUES(1, ' Deng Pioneer '),(2, ' Deng Pioneer '),(5, ' Fdafdsaf '),(6, ' www.111cn.net ');All right, everything's up.*/
$dbHost = ' localhost '; Can not change$dbUser = ' root '; You mysql user name$dbPass = ' root '; Change to your own MySQL server
The following is a detailed analysis of the basic usage of the regular expression preg_match_all in PHP. For more information, see
The following is a detailed analysis of the basic usage of the regular expression preg_match_all in PHP. For more information, see
Before learning about
MySQL regular expression we initially know that in SQL, you can use the like predicate (expression) for fuzzy search and support % ,?, . In MySQL, The REGEXP keyword is provided to support regular expressions. Of course, it is just some simple
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.