Regular Expression Metacharacters : Introduction « Regular Expressions Functions « Oracle PL/SQL Tutorial

Oracle PL/SQL Tutorial
1. Introduction
2. Query Select
3. Set
4. Insert Update Delete
5. Sequences
6. Table
7. Table Joins
8. View
9. Index
10. SQL Data Types
11. Character String Functions
12. Aggregate Functions
13. Date Timestamp Functions
14. Numerical Math Functions
15. Conversion Functions
16. Analytical Functions
17. Miscellaneous Functions
18. Regular Expressions Functions
19. Statistical Functions
20. Linear Regression Functions
21. PL SQL Data Types
22. PL SQL Statements
23. PL SQL Operators
24. PL SQL Programming
25. Cursor
26. Collections
27. Function Procedure Packages
28. Trigger
29. SQL PLUS Session Environment
30. System Tables Data Dictionary
31. System Packages
32. Object Oriented
33. XML
34. Large Objects
35. Transaction
36. User Privilege
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Oracle PL/SQL Tutorial » Regular Expressions Functions » Introduction 
18. 1. 1. Regular Expression Metacharacters

The following table lists some of the metacharacters you can use in a regular expression, along with their meaning and a simple example of their use.

MetacharactersMeaningExamples
\Indicates that the match character is a special character, a literal, or a backreference. (A backreference repeats the previous match.)\n matches the newline character,\\ matches \, \( matches (, \) matches )
^Matches the position at the start of the string.^A matches A if A is the first character in the string.
$Matches the position at the end of the string.$B matches B if B is the last character in the string.
*Matches the preceding character zero or more times.ba*rk matches brk, bark, baark, and so on.
+Matches the preceding character one or more times.ba+rk matches bark, baark, and so on, but not brk.
?Matches the preceding character zero or one time.ba?rk matches brk and bark only.
{n}Matches a character exactly n times, where n is an integer.hob{2}it matches hobbit.
{n,m}Matches a character at least n times and at most m times, where n and m are both integers.hob{2,3}it matches hobbit and hobbbit only.
.Matches any single character except null.hob.it matches hobait, hobbit, and so on.
(pattern)A subexpression that matches the specified pattern. You use subexpressions to build up complex regular expressions. You can access the individual matches, known as captures, from this type of subexpression.anatom(y|ies) matches anatomy and anatomies.
x|yMatches x or y, where x and y are one or more characters.war|peace matches war or peace.
[abc]Matches any of the enclosed characters.[ab]bc matches abc and bbc.
[a-z]Matches any character in the specified range.[a-c]bc matches abc, bbc, and cbc.
[: :]Specifies a character class and matches any character in that class.[:alphanum:] matches alphanumeric characters 0-9, A-Z, and a-z.[:alpha:] matches alphabetic characters A-Z and a-z.[:blank:] matches space or tab.[:digit:] matches digits 0-9.[:graph:] matches non-blank characters.[:lower:] matches lowercase alphabetic characters a-z.[:print:] is similar to [:graph:] except [:print:] includes the space character.[:punct:] matches punctuation characters .,"', and so on.[:space:] matches all whitespace characters.[:upper:] matches all uppercase alphabetic characters A-Z.[:xdigit:] matches characters permissible in a hexadecimal number 0-9, A-F, and a-f.
[..]Matches one collation element, like a multicharacter element.No example.
[==]Specifies equivalence classes.No example.
\nThis is a backreference to an earlier capture, where n is a positive integer.(.)\1 matches two consecutive identical characters. The (.) captures any single character except null, and the \1 repeats the capture, matching the same character again, therefore matching two consecutive identical characters.


Quote from:

Oracle Database 10g SQL (Osborne ORACLE Press Series) (Paperback)

# Paperback: 608 pages

# Publisher: McGraw-Hill Osborne Media; 1st edition (February 20, 2004)

# Language: English

# ISBN-10: 0072229810

# ISBN-13: 978-0072229813

18. 1. Introduction
18. 1. 1. Regular Expression Metacharacters
18. 1. 2. Regular Expression Functions
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.