Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books
SQL Server Books
Oracle Software
image
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
  Phone
  252-431-0050
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

    Privacy Policy

 

   
  Oracle Tips by Burleson

Oracle10g Changes to SUBSTR

The SUBSTR function has been extended by the regexp_substr function provided in Oracle Database 10g.

The regexp_substr function extends the functionality of the SUBSTR function by letting you search a string for a POSIX or Unicode compliant regular expression pattern. It is also similar to regexp_instr, but instead of returning the position of the substring, it returns the substring itself.

The regexp_substr function is useful if you need the contents of a match string, but not its position in the source string. The function returns the string as VARCHAR2 or CLOB data in the same character set as the supplied source_string.

Here is an example use of the regexp_substr:

SQL> SELECT
   2 REGEXP_SUPSTR('5035 Forest Run Trace, Alpharetta, GA',
   3 ',[^,]+,') "Test"
   4 FROM dual;

Test
------------------
, Alpharetta,

In this example we search for a comma, followed by one or more characters immediately followed by a comma.

Let's look at the multi-lingual regular expression syntax used in these new functions.


Get the complete Oracle10g story:

The above text is an excerpt from "Oracle Database 10g New Features: Oracle10g Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

http://www.rampant-books.com/book_2003_2_oracle10g.htm

http://rampant-books.com/book_2003_2_audit.htm

 

Download your Oracle scripts now:

www.oracle-script.com

The definitive Oracle Script collection for every Oracle professional DBA

 

Linux Oracle commands syntax poster

wise Oracle tuning software

Oracle data dictionary reference poster

Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

OracleŽ is the registered trademark of Oracle Corporation. SQL ServerŽ is the registered trademark of Microsoft Corporation.
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks