O'Reilly logo

Expert Oracle PL/SQL by Michael McLaughlin, Ron Hardman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix A. Regular Expression Metacharacters and Functions

If you have a background in Perl, you should be familiar with regular expressions added in version 10g of the Oracle data server. Oracle 10g supports the IEEE POSIX extended regular expressions standard and works with the following data types:

  • CHAR

  • VARCHAR2

  • NCHAR

  • NVARCHAR

  • CLOB

  • NCLOB

See Chapter 10 for more on this topic.

POSIX Bracket Expressions

The following POSIX bracket expressions (shown in Table A-1) are available with Oracle 10g Release 2.

Table A-1. POSIX Bracket Expressions

Bracket Expression

Description

Example

[[:alnum:]]

Alphanumeric characters

SELECT REGEXP_SUBSTR(
'3967 S. Bills Dr., Stevens Point, WI
54481', '[[:alnum:]]{4}')
FROM dual;

[[:alpha:]]

Alphabetic characters

SELECT REGEXP_SUBSTR( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required