Reqular Expressions Reference


Tags:

                                 
Regular Expressions Reference Sheet
-----------------------------------
                                                 
^       match pattern at beginning of string

$       match pattern at end of string               

.       match any single character (except newline)                                         

[]      match one of any characters enclosed within the []     
        [bBaA] matches b, B, a, and A

[^]     match one of any character EXCEPT those enclosed within the []  
        [^bBaA] matches everything EXCEPT b, B, a, and A
 
[-]     matches any characters within the range specified within the []                 
        [1-5] matches 1, 2, 3, 4, and 5
        [a-e] matches a, b, c, d, and e

?       match one or zero times
                  
+       match one or more times                  

*       match zero or more times                 
                                
|       or - match one or another
        a|b will match on either a or b