Regular Expressions : Introduction « Regular Expression « SQL / MySQL

Home
SQL / MySQL
1.Aggregate Functions
2.Backup Load
3.Command MySQL
4.Cursor
5.Data Type
6.Database
7.Date Time
8.Engine
9.Event
10.Flow Control
11.FullText Search
12.Function
13.Geometric
14.I18N
15.Insert Delete Update
16.Join
17.Key
18.Math
19.Procedure Function
20.Regular Expression
21.Select Clause
22.String
23.Table Index
24.Transaction
25.Trigger
26.User Permission
27.View
28.Where Clause
29.XML
SQL / MySQL » Regular Expression » Introduction 
Regular Expressions
       


Character     Description
 
*             Matches zero or more instances of the string preceding it
 
+             Matches one or more instances of the string preceding it
 
?             Matches zero or one instances of the string preceding it
 
.             Matches any single character
 
[xyz]         Matches any of x, y, or z (the characters within the brackets)
 
[A-Z]         Matches any uppercase letter
 
[a-z]         Matches any lowercase letter
 
[0-9]         Matches any digit
 
^             Anchors the match from the beginning
 
$             Anchors the match to the end
 
|             Separates strings in the regular expression
 
{n,m}         String must occur at least n times, but no more than n 
 
{n}           String must occur exactly n times
 
{n,|          String must occur at least n times
 

   
    
    
    
    
    
    
  
Related examples in the same category
1.Group the alternatives within parentheses, the ^ and $ will apply to both of them
2.The asterisk (*) indicates zero or more.
3.Limit the match on the 'i' to either zero or one.
4.As the plus sign (+) indicates that g had to appear one or more times
5.{3,} means the a must occur at least three times
6.MySQL's regular expression capabilities also support POSIX character classes.
7.Using Operators in Your SQL Statements
8.If you wish to encompass the entire character string, you must use ^ and $ in the search:
9.Name and regular expression
10.String with exact length
11.String case in regular expression
12.Where clause: regular expressions
13.Where clause: regular expression 2
14.show records where the name has 6 characters
15.A regular expression matches anywhere in the string.
16.Match only aaa
17.To match abcabcabc, you need to use parentheses
18.Regular expression and postcode
19.Regular expression and street value
20.Regular expression: or
21.Parentheses indicate an entire character string, and curly braces indicate how many times the character string
22.Square brackets indicate a selection from among several characters, a hyphen is used to indicate a range of ch
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.