# Oracle Database/Regular Expression Support
## Use regular expressions to search for, match, and replace strings

Regular Expression :
| Class | Expression | Description |
| Anchoring Character | ^ | Start of a line |
| Anchoring Character | $ | End of a line |
| Quantifier Character | * | Match 0 or more times |
| Quantifier Character | + | Match 1 or more times |
| Quantifier Character | ? | Match 0 or 1 time |
| Quantifier Character | {m} | Match exactly m times |
| Quantifier Character | {m,} | Match at least m times |
| Quantifier Character | {m, n} | Match at least m times but no more than n times |
| Quantifier Character | \n | Cause the previous expression to be repeated n times |
| Alternative and Grouping | | | Separates alternates, often used with grouping operator |
| Alternative and Grouping | ( ) | Groups subexpression into a unit for alternations, for quantifiers, or for backreferencing (see "Backreferences" section) |
| Alternative and Grouping | [char] | Indicates a character list; most metacharacters inside a character list are understood as literals, with the exception of character classes, and the ^ and - metacharacters |
| Posix Character | [:alnum:] | Alphanumeric characters |
| Posix Character | [:alpha:] | Alphabetic characters |
| Posix Character | [:blank:] | Blank Space Characters |
| Posix Character | [:cntrl:] | Control characters (nonprinting) |
| Posix Character | [:digit:] | Numeric digits |
| Posix Character | [:graph:] | Any [:punct:], [:upper:], [:lower:], and [:digit:] chars |
| Posix Character | [:lower:] | Lowercase alphabetic characters |
| Posix Character | [:print:] | Printable characters |
| Posix Character | [:punct:] | Punctuation characters |
| Posix Character | [:space:] | Space characters (nonprinting), such as carriage return, newline, vertical tab, and form feed |
| Posix Character | [:upper:] | Uppercase alphabetic characters |
| Posix Character | [:xdigit:] | Hexidecimal characters |
| Equivalence class | = = | An equivalence classes embedded in brackets that matches a base letter and all of its accented versions. eg, equivalence class '[=a=]' matches ä and â. |
| Match Option | c | Case sensitive matching |
| Match Option | i | Case insensitive matching |
| Match Option | m | Treat source string as multi-line activating Anchor chars |
| Match Option | n | Allow the period (.) to match any newline character |
| x | ignore white space characters |

### REGEXP_LIKE

REGEXP_LIKE performs complex regular expression pattern matching and supports much greater range of string patterns than LIKE. this function is introduced in 10g.
last name begin with T and the 2nd character is either 'o' or 'u'
last name begin with 'T' and end with 'r'
first name is either 'Steven' or 'Stephen'
last name contain double vowel characters (ie. 'aa', 'ee', 'ii', 'oo', 'uu') and the matching is non-case sensitive

### REGEXP_INSTR

REGEXP_INSTR performs complex regular expression pattern matching and supports much greater range of string patterns than INSTR. this function is introduced in 10g.
show the position of the 1st lowercase vowel characters

### REGEXP_SUBSTR

REGEXP_SUBSTR performs complex regular expression pattern matching and supports much greater range of string patterns than SUBSTR. this function is introduced in 10g.
extract the 1st character if the last name start with 'A' or 'C'
Start at 3rd position, extract 2 characters from the last name

### REGEXP_COUNT

REGEXP_COUNT performs count against a value and it is different from the aggregate COUNT function. This function is introduced in 11g.
find the occurrences of the vowel pattern in the last name